File manager - Edit - /home/autoph/public_html/voc/home/activate_new_account.php
Back
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> .loader { border: 16px solid #f3f3f3; border-radius: 50%; border-top: 16px solid blue; border-bottom: 16px solid blue; width: 120px; height: 120px; -webkit-animation: spin 2s linear infinite; animation: spin 2s linear infinite; } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> <title></title> <style type="text/css"> body{ background:#fafcfc; } a{ text-decoration:none; } } #wrapper{ width:50%; height:auto; margin:10px auto; border:1px solid #cbcbcb; background:white; } #comment_input_from li{ list-style-type:none; margin:5px auto; } #comment_input_from{ width:100%; margin:0px; background: #dde2e4 ; padding:10px; } #display_area{ width:100%; margin:00px auto; background:#fafcfc; padding:2px; height:60%; overflow:auto; border:1px solid gray; } #displayAdminArea{ width:100%; margin-top:20px; background:#fafcfc; padding:2px; height:30%; overflow:auto; border:1px solid gray; } #submit_name{ width:30%; min-width:150px; margin:20px; padding:20px; } #name, textarea{ width:100%; } </style> </head> <script type="text/javascript"> function HideAccountActive(){ $("#AccountActive").fadeOut(10000); }; function ShowAccountActive(){ $("#AccountActive").fadeIn(); }; function LoadDeleteForm(){ var divc=document.getElementById("confirmDeleteForm"); var diva=document.getElementById("confirmAccessRequestForm"); var divb=document.getElementById("confirmActivationRequestForm"); if (divc.style.display == 'none') { divc.style.display = ''; divb.style.display = 'none'; diva.style.display = 'none'; } else { divc.style.display = 'none'; divb.style.display = 'none'; diva.style.display = 'none'; } } function LoadActivationForm(){ var diva=document.getElementById("confirmActivationRequestForm"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } //---------------------------- function LoadAccessForm(){ var diva=document.getElementById("confirmAccessRequestForm"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } //---------------------------- function DeleteSelectedAccess(row) { var x=row.cells; document.getElementById("deleteAccessID").value = x[0].innerHTML; } //---------------------------- function getSelectedUSER(row) { var x=row.cells; document.getElementById("activateID").value = x[0].innerHTML; document.getElementById("userName").value = x[1].innerHTML + " " + x[2].innerHTML; document.getElementById("mobileNumber").value = x[5].innerHTML; document.getElementById("emailAddress").value = x[6].innerHTML; } function getSelectedADMIN(row) { var x=row.cells; document.getElementById("selUserID").value = x[0].innerHTML; document.getElementById("selUserName").value = x[2].innerHTML + ", " + x[1].innerHTML; } </script> <body> <div id="confirmActivationRequestForm" style="float:left;position:absolute;top:10px;left:10px;width:500px;height:400px;border:1px solid gray;background:white;display:none;z-index:999999999"> <div style='vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-size:16px;font-weight:normal;color:#043062;text-align:left;'> ❑ CONFIRM ACCOUNT ACTIVATION: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='#' onclick='LoadActivationForm()' style='font-weight:bold'> ✕ </a> </div> </div> <p style="text-align:center;font-family:Arial;font-size:18px;color:red">Are you sure you want to activate this account?</p> <input type="hidden" id="activateID"> <input type="hidden" id="comID"> <div style="padding:50px;padding-top:20px;border:0px solid red"> <div style="font-family:Arial;font-size:14px">NAME</div> <input type="texts" id="userName" style="width:100%;border:0px solid red;padding:5px;font-family:Arial;font-size:18px;color:blue"> <div style="font-family:Arial;font-size:14px">MOBLE NUMBER</div> <input type="text" id="mobileNumber" style="width:100%;border:0px solid red;padding:5px;font-family:Arial;font-size:18px;color:blue"> <div style="font-family:Arial;font-size:14px">E-MAIL ADDRESS</div> <input type="text" id="emailAddress" style="width:100%;border:0px solid red;padding:5px;font-family:Arial;font-size:18px;color:blue"> </div> <center><button id="ActivateNow" style="font-family:Arial;font-size:16px;padding:10px;">Yes,Activate this account.</button></center> </div> <div id="confirmDeleteForm" style="float:left;position:absolute;top:10px;left:10px;width:400px;height:250px;border:1px solid gray;background:white;display:none;z-index:999999999"> <div class="bgColor" style='vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-size:16px;font-weight:normal;color:#043062;text-align:left;'> ❑ Remove Admin Access: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='#' onclick='LoadDeleteForm()' style='font-weight:bold'> ✕ </a> </div> </div> <p style="text-align:center;font-family:Arial;font-size:18px;color:red;padding:15px;">Are you sure you want to DELETE this record?</p> <input type="hidden" id="deleteAccessID"> <center><button id="DeleteAccessNow" style="font-family:Arial;font-size:16px;padding:10px;">Yes, Delete this Access.</button></center> <div style="padding:15px;border:0px solid white;font-family:Arial;font-size:14px;text-align:center;margin-top:10px;" id="displayDeleteRecord"></div> </div> <div id="confirmAccessRequestForm" style="float:left;position:absolute;top:10px;left:10px;width:500px;height:417px;border:1px solid gray;background:white;display:none;z-index:999999999"> <div class="bgColor" style='vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-size:16px;font-weight:bold;color:#043062;text-align:left;'> 🔐 MANAGE BRAND ACCESS: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='#' onclick='LoadAccessForm()' style='font-weight:bold'> ✕ </a> </div> </div> <!-- selUserID brandID reload AddCompany--> <input type="hidden" id="selUserID" style="font-family:Arial;font-size:14px;width:100%"> <div style="position:relative;width:100%;padding:1px;border:1px solid gray;height:150px;padding:30px;padding-top:10px"> <p style="margin:0px;">Brand Admin:<br> <input type="text" id="selUserName" ReadOnly style="font-family:Arial;font-size:14px;width:100%;padding-left:0px"></p> <select id="brandID" style="margin-left:0px;float:left;width:60%;font-family:Arial;font-size:14px;height:30px"> <option>--Select Brand--</option> <?php $optionSQL=mysql_query("SELECT * FROM `vts_brands` WHERE `b_status`='1' ORDER BY `b_name` ASC"); while($out=mysql_fetch_array($optionSQL)){ echo "<option value='".$out['b_id']."'>".$out['b_name']."</option>"; } ?> <select> <input type="submit" id="AddCompany" value="Submit" style="float:right;padding:5px;width:30%;margin-left:20px;height:30px"> </div> <div class="bgColor" style='padding:5px;position:relative;width:100%'> 🔑CURRENT ACCESS:</div> <div style="width:100%;padding:0px;border:0px solid gray;height:200px"> <div id="displayAccess" style="width:100%;border:0px solid blue;min-height:198px;overflow:auto;text-align:center"><button style="margin:50px;padding:10px;border-radius:10px;width:150px;background:transparent" id="reload"><<< Reload >>></button></div> </div> </div> <div style="display:none;width:100%;position:relative;height:40px;background:yellow;padding:8px;" id="AccountActive">Account has been activated</div> <h1 style='margin:0px;font-family:Verdana;font-size:22px;font-weight:normal;padding-left:5px;color:blue;font-weight:bold'>ACCOUNT MANAGEMENT <?php echo " : ". $comName;?></h1> <i style='font-family:Verdana;font-size:10px;color:gray;padding-left:5px'>Newly registered accounts via Mobile App can only activated by Sales Admin via Portal</i> <div style='border:0px solid red;width:99%;height:826px;min-height:600px;float:left;margin:5px;min-width:600px;background:white'> <div style='vertical-align:top;height:35px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:bold;color:red'> Mobile User Account: <div style='float:right;font-family:Verdana;font-size:15px;'> <a href=' ' class='hideClick hidden' > ♲ </a><!--REFRESH/RELOAD WINDOW--> <a href=' ' class='hideClick hidden' > ✉ </a> <!--EXTRACT LIST OF COMPANY AND EXPORT TO EXCEL--> <a href='http://localhost/vts/autohub.php?id=x&d=x' class='hideClick hidden' style='font-weight:bold'> ✕ </a> </div> </div> <input type="hidden" id="addBy" value="<?php echo $userID;?>"> <input type="hidden" id="addDate" value="<?php echo $toDate;?>"> <div id="display_area"> <?php $result = mysql_query("SELECT * FROM vts_users WHERE `deleted` = 0 AND `company`='$comID' ORDER BY `u_id` DESC"); echo "<table style='width:100%;'>"; echo "<thead> <tr> <th>RECORD ID</th> <th>FIRST NAME</th> <th>LAST NAME</th> <th>COMPANY</th> <th>DEALERSHIP</th> <th>REGISTERED MOBILE</th> <th>E-MAIL ADDRES</th> <th>STATUS</th> <th>ACTION</th> </tr> </thead>"; while($row=mysql_fetch_array($result)){ ?><tr onclick="javascript:getSelectedUSER(this);"><?php echo "<td>".$row['u_id']."</td>"; echo "<td>".$row['u_fname']."</td>"; echo "<td>".$row['u_lname']."</td>"; echo "<td>"; $compName = mysql_result(mysql_query("SELECT `comp_name` FROM `vts_company` WHERE `comp_id`='".$row['company']."'"),0); echo $compName; echo "</td>"; echo "<td>"; $dealName = mysql_result(mysql_query("SELECT `deal_name` FROM `vts_dealerships` WHERE `deal_id`='".$row['dealer']."'"),0); echo $dealName; echo "</td>"; echo "<td>".$row['usr_mobile']."</td>"; echo "<td>".$row['email']."</td>"; echo "<td>"; if($row['u_status']== 0){echo 'For Activation';}else{echo 'Active';} echo"</td>"; echo "<td>"; if($row['u_status']== 0){?> <button id="iActivate" onclick="LoadActivationForm()" style="border:1px solid red;margin:1px;font-family:Arial;font-size:14px;font-weight:bold;color:blue;padding:3px;width:100%">Activate</button> <?php }else{echo 'Activated';} echo"</td>"; echo "</tr>"; } echo "</table>"; ?> </div> <div style='vertical-align:top;height:35px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:bold;color:red'> Admin Account: </div> <div id="displayAdminArea"> <?php $result = mysql_query("SELECT * FROM vts_users WHERE `deleted` = 0 AND `company`='$comID' AND `account_type`='Admin' ORDER BY `u_id` DESC"); echo "<table style='width:100%;'>"; echo "<thead> <tr> <th>RECORD ID</th> <th>FIRST NAME</th> <th>LAST NAME</th> <th>ACCOUNT TYPE</th> <th>REGISTERED MOBILE</th> <th>E-MAIL ADDRES</th> <th>STATUS</th> <th>ACTION</th> </tr> </thead>"; while($row=mysql_fetch_array($result)){ ?><tr onclick="javascript:getSelectedADMIN(this);"><?php echo "<td>".$row['u_id']."</td>"; echo "<td>".$row['u_fname']."</td>"; echo "<td>".$row['u_lname']."</td>"; echo "<td>".$row['account_type']."</td>"; echo "<td>".$row['usr_mobile']."</td>"; echo "<td>".$row['email']."</td>"; echo "<td>"; if($row['u_status']== 0){echo 'For Activation';}else{echo 'Active';} echo"</td>"; echo "<td>"; ?> <button id="iActivate" onclick="LoadAccessForm()" style="border:1px solid red;margin:1px;font-family:Arial;font-size:14px;font-weight:bold;color:blue;padding:3px;width:100%">Manage Access</button> <?php echo"</td>"; echo "</tr>"; } echo "</table>"; ?> </div> </div> </body> </html> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="wait" style="display:none;width:69px;height:89px;border:0px solid red;position:absolute;top:50%;left:50%;padding:2px;"> <img src='images/demo_wait.gif' width="64" height="64" /><br>Loading..</div> <!-- add jquery --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ //loading gif animator during query or page load $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); $("#ActivateNow").click(function(){ var activateID = $("#activateID").val(); var comID = $("#comID").val(); //alert("Its working"); $.ajax({ url: "update_and_activate_new_account.php", type: "POST", async: false, data: { "done": 1, "comID": 1,comID, "activateID" : activateID }, success: function(d){ ShowAccountActive(); $("#display_area").html(d); HideAccountActive(); LoadActivationForm(); } }) }); $("#reload").click(function(){ var brandID = $("#brandID").val(); var selUserID = $("#selUserID").val(); $.ajax({ url: "reload_admin_user_access.php", type: "POST", async: false, data: { "done": 1, "brandID": 1,brandID, "selUserID" : selUserID }, success: function(d){ $("#displayAccess").html(d); } }) }); $("#DeleteAccessNow").click(function(){ var deleteAccessID = $("#deleteAccessID").val(); $.ajax({ url: "reload_admin_user_access.php", type: "POST", async: false, data: { "deleteNow": 1, "brandID": 1,deleteAccessID }, success: function(d){ $("#displayDeleteRecord").html(d); } }) }); $("#AddCompany").click(function(){ var brandID = $("#brandID").val(); var selUserID = $("#selUserID").val(); $.ajax({ url: "reload_admin_user_access.php", type: "POST", async: false, data: { "AddNew": 1, "brandID": 1,brandID, "selUserID" : selUserID }, success: function(d){ $("#displayAccess").html(d); } }) }); }); </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings