File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/admin/UpdateGMPMainline.php
Back
<!DOCTYPE html> <html lang="en" class="loading"> <head> <title>Share Market IPO</title> <script src="app-assets/vendors/js/sweetalert2.min.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/sweetalert2.min.css"> <link rel="apple-touch-icon" sizes="60x60" href="app-assets/img/ico/apple-icon-60.png"> <link rel="apple-touch-icon" sizes="76x76" href="app-assets/img/ico/apple-icon-76.png"> <link rel="apple-touch-icon" sizes="120x120" href="app-assets/img/ico/apple-icon-120.png"> <link rel="apple-touch-icon" sizes="152x152" href="app-assets/img/ico/apple-icon-152.png"> <link rel="shortcut icon" type="image/x-icon" href="app-assets/img/ico/favicon.ico"> <link rel="shortcut icon" type="image/png" href="app-assets/img/ico/favicon-32.png"> <link href="https://fonts.googleapis.com/css?family=Rubik:300,400,500,700,900%7CMontserrat:300,400,500,600,700,800,900" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="app-assets/fonts/feather/style.min.css"> <link rel="stylesheet" type="text/css" href="app-assets/fonts/simple-line-icons/style.css"> <link rel="stylesheet" type="text/css" href="app-assets/fonts/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/perfect-scrollbar.min.css"> <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/prism.min.css"> <link rel="stylesheet" type="text/css" href="app-assets/vendors/css/chartist.min.css"> <link rel="stylesheet" type="text/css" href="app-assets/css/app.css"> <script> function UpdateGMP(id) { var gmp = document.getElementById("DisplayGMP" + id).value; var iid = document.getElementById("ID" + id).value; var agmp = document.getElementById("NewGMP" + id).value; if(agmp.includes("-")) { const myArray1 = agmp.split("-"); agmp = myArray1[1]; } var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("Button" + id).innerHTML = this.responseText; } }; xhttp.open("GET", "UpdateGMP.php?id=" + iid + "&agmp=" + agmp + "&gmp=" + encodeURIComponent(gmp), true); xhttp.send(); } function ReloadNoti() { } function CalculateGMP(id) { var price = document.getElementById("Price" + id).value; if(price.includes("-")) { const myArray = price.split("-"); price = myArray[1]; } var gmp = document.getElementById("NewGMP" + id).value; var fullgmp = gmp; var onenum = false; if(gmp.includes("-")) { const myArray1 = gmp.split("-"); gmp = myArray1[1]; if(myArray1[0] == "") onenum = true; } var cgmp = (gmp*100)/price; if(onenum) var newgmp = "GMP: Rs " + fullgmp + " Per Share (-" + cgmp.toFixed(2) + "%)"; else var newgmp = "GMP: Rs " + fullgmp + " Per Share (+" + cgmp.toFixed(2) + "%)"; document.getElementById("DisplayGMP" + id).value = newgmp; } </script> </head> <body data-col="2-columns" class=" 2-columns "> <!--ValidateUser--> <?php session_start(); if(!isset($_SESSION['user'])){ $page = "login.php"; header("location:$page"); exit; } require_once('Connection.php'); $sql = "SELECT `id` AS 'ID',`c_name` AS 'NAME',`o_price` AS 'PRICE',`GMP` AS 'GMP' FROM `ipo_post` WHERE `status` = 'PRESENT' && `TYPE` = 'M'"; $rows = $con->query($sql); ?> <div class="wrapper"> <!--Navbar menu--> <?php include("Navbar.php"); ?> <div class="main-panel"> <div class="main-content"> <div class="content-wrapper"> <center> <div class="container-fluid"> <div class="row"> <div class="col-md-4"> <div class="card"> <div class="card-header"> <div class="card-title-wrap bar-primary"> <h4 class="card-title" id="horz-layout-icons">GMP Update Notification ✈️</h4> </div> </div> <div class="card-body"> <div class="px-3"> <div class="form form-horizontal"> <div class="form-body"> <div class="form-group row" style="display: none"> <label class="col-md-3 label-control" for="timesheetinput1">ID: </label> <div class="col-md-9"> <div class="position-relative has-icon-left"> <div class="form-control-position"> <i class="icon-user"></i> </div> </div> </div> </div> <div class="form-group row"> <label class="col-md-3 label-control" for="timesheetinput1">Current GMP: </label> <div class="col-md-9"> <div class="position-relative"> <input type="text" class="form-control" id="NotiTitle" value="📣 Latest GMP Update 💰" required=""> </div> </div> </div> <div class="form-group row"> <label class="col-md-3 label-control" for="timesheetinput1">Display GMP: </label> <div class="col-md-9"> <div class="position-relative"> <textarea class="form-control" id="NotiDesc" name="displaymsg" rows="7" spellcheck="false"></textarea> </div> </div> </div> <div class="form-group right"> <button id="ReloadBtn" class="btn btn-success"> <i class="icon-reload"></i> Reload </button> <button id="SendNotiBtn" class="btn btn-danger"> <i class="icon-paper-plane"></i> Send Notification </button> </div> </div> </div> </div> </div> </div> </div> </div> <div class="row"> <?php $no = 1; while($row = $rows->fetch_assoc()) { ?> <div class="col-md-4"> <div class="card"> <div class="card-header"> <div class="card-title-wrap bar-primary"> <h4 class="card-title" id="horz-layout-icons"><?php echo $row['NAME'] ?></h4> </div> </div> <div class="card-body"> <div class="px-3"> <div class="form form-horizontal" > <div class="form-body"> <div class="form-group row" style="display: none"> <label class="col-md-3 label-control" for="timesheetinput1">ID: </label> <div class="col-md-9"> <div class="position-relative has-icon-left"> <input type="text" id="ID<?php echo $no;?>" class="form-control" name="ipo_id" value="<?php if(isset($row)){ echo $row['ID']; } ?>" required readonly> <div class="form-control-position"> <i class="icon-user"></i> </div> </div> </div> </div> <div class="form-group row"> <label class="col-md-3 label-control" for="timesheetinput1">Current GMP: </label> <div class="col-md-9"> <div class="position-relative"> <input type="text" id="timesheetinput1" class="form-control" name="ipo_id" value="<?php if(isset($row)){ echo $row['GMP']; } ?>" required readonly> </div> </div> </div> <div class="form-group row"> <label class="col-md-3 label-control" for="timesheetinput2">Enter GMP: </label> <div class="col-md-3"> <div class="position-relative"> <input type="text" id="NewGMP<?php echo $no;?>" class="form-control" name="ipoc_name" value="" onkeyup="CalculateGMP(<?php echo $no; ?>)"> </div> </div> <label class="col-md-3 label-control" for="timesheetinput3">Offer Price: </label> <div class="col-md-3"> <div class="position-relative"> <input type="text" id="Price<?php echo $no;?>" class="form-control" name="ipoi_date" value="<?php if(isset($row)){ echo $row['PRICE']; } ?>" required readonly> </div> </div> </div> <div class="form-group row"> <label class="col-md-3 label-control" for="timesheetinput1">Display GMP: </label> <div class="col-md-9"> <div class="position-relative"> <input type="text" id="DisplayGMP<?php echo $no;?>" class="form-control" name="new_gmp" value="" required> </div> </div> </div> <div class="form-group right"> <button onclick="UpdateGMP(<?php echo $no; ?>)" id="Button<?php echo $no;?>" class="btn btn-success"> <i class="icon-note"></i> Update </button> </div> </div> </div> </div> </div> </div> </div> <?php $no = $no + 1; } ?> </div> </div> </div> </div> </div> </div> </div> <!-- ////////////////////////////////////////////////////////////////////////////--> <!-- BEGIN VENDOR JS--> <script src="app-assets/vendors/js/core/jquery-3.3.1.min.js"></script> <script src="app-assets/vendors/js/core/popper.min.js"></script> <script src="app-assets/vendors/js/core/bootstrap.min.js"></script> <script src="app-assets/vendors/js/perfect-scrollbar.jquery.min.js"></script> <script src="app-assets/vendors/js/prism.min.js"></script> <script src="app-assets/vendors/js/jquery.matchHeight-min.js"></script> <script src="app-assets/vendors/js/screenfull.min.js"></script> <script src="app-assets/vendors/js/pace/pace.min.js"></script> <!-- BEGIN VENDOR JS--> <!-- BEGIN PAGE VENDOR JS--> <script src="app-assets/vendors/js/chartist.min.js"></script> <!-- END PAGE VENDOR JS--> <!-- BEGIN CONVEX JS--> <script src="app-assets/js/app-sidebar.js"></script> <script src="app-assets/js/notification-sidebar.js"></script> <!-- END CONVEX JS--> <!-- BEGIN PAGE LEVEL JS--> <script src="app-assets/js/dashboard-ecommerce.js"></script> <!-- END PAGE LEVEL JS--> <script> $("#ReloadBtn").click(function(){ $.get("getLastGmpNoti.php?type=M", function(data, status){ if(status == "success") { $("#NotiDesc").val(data); } else { alert("Data: " + data + "\nStatus: " + status); } }); }); $("#SendNotiBtn").click(function(){ var notiTitle = $("#NotiTitle").val(); var notiDesc = $("#NotiDesc").val(); if(notiDesc == "" || notiTitle == "") alert("Empty Notification. Can not send"); else { $.post("./notification/send_noti.php", {title: notiTitle,msg: notiDesc,activity: "NONE"}, function(result){ $("#SendNotiBtn" + id).html("Sent"); }); } }); </script> <script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" data-cf-beacon='{"rayId":"82e11d8e595b1894","r":1,"version":"2023.10.0","token":"3747aade8683445eb7a899582157f7d4"}' crossorigin="anonymous"></script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings