Server IP : 162.240.98.243 / Your IP : 3.135.196.146 Web Server : Apache System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : btiyawmy ( 1003) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/btiyawmy/public_html/login.easenup.in/Pharmacy/ |
Upload File : |
<?php session_start(); require_once('../../LoginManager.php'); require_once('../../DBManager.php'); include('menu.php'); include('header.php'); include("../dbconnection.php"); $target_dir = "uploads/"; $filename = basename($_FILES["fileToUpload"]["name"]); $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION)); if(isset($_POST['submit'])) { $CheckPatient = $con->query("SELECT * FROM `pharma_doc` WHERE `pharma_Id` = '$_GET[userno]' AND `dateofissue` = '$_POST[dateofissue]' AND `issueby` = '$_POST[issueby]' AND `typedocument` = '$_POST[typedocument]' AND `Specify` = '$_POST[Specify]'"); $numSU=mysqli_num_rows($CheckPatient); if($numSU > 0){ echo "<script>alert('Already Exists');</script>"; echo "<script>window.location='ProfessionalProfile.php?userno=$_GET[userno]';</script>;</script>"; }else{ $created_at=date("F d, Y / h:i:s A"); $sql="INSERT INTO `pharma_doc`(`pharma_Id`, `dateofissue`, `issueby`, `typedocument`, `Specify`, `fileToUpload`, `Created_at`) VALUES ('$_GET[userno]','$_POST[dateofissue]','$_POST[issueby]','$_POST[typedocument]','$_POST[Specify]','$filename','$created_at')"; //echo $sql; if($qsql = mysqli_query($con,$sql)) { if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { echo "<script>alert('Record Add successfully...');</script>"; echo "<script>window.location='ProfessionalProfile.php?userno=$_GET[userno]';</script>;</script>"; } } else { echo "Sorry, there was an error uploading your file."; } } } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <title> Laboratory access</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="new2.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#myForm').submit(function() { $('#loaderImg').show(); return true; }); }); </script> <style> #loaderImg { position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; border: 10px solid grey; border-radius: 50%; border-top: 10px solid black; width: 100px; height: 100px; animation: spin 1s linear infinite; z-index:1000000000; } @keyframes spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } </style> <script> function myFunction2() { var checkBox = document.getElementById("myCheck2"); var text = document.getElementById("text2"); if (checkBox.checked == true){ text.style.display = "block"; } else { text.style.display = "none"; } }</script> </head> <body> <div class="content-wrapper"> <section class="content-header"> <div style = "display:none;" id = "loaderImg"> <div class="loader"> </div> </div> <?php session_start(); require_once('../../DBManager.php'); require_once('../../LoginManager.php'); $narayan=LoginManager::currentUser(); $harilal=LoginManager::getUserTypeByuname("$narayan"); $sql ="SELECT * FROM site_users WHERE userno='$harilal'"; $qsql = mysqli_query($con,$sql); $re = mysqli_fetch_array($qsql); ?> <a href='ProfessionalProfile.php' style="float:right;font-size:25px;"><i class="fa fa-window-close-o" aria-hidden="true"></i></a> <form method="post" id="myForm" enctype="multipart/form-data"> <label>Date of issue</label> <input type="date" name="dateofissue" id="dateofissue"> <label>Issue By</label> <input type="text" name="issueby" id="issueby" placeholder='Issue By'> <label>Type of Document</label> <select name="typedocument" id="typedocument"> <option value="" disabled selected> Education Qualification</option> <option value='Higher Secondary School / High School'>Higher Secondary School / High School</option> <option value='Diploma'>Diploma</option> <option value='Graduation'>Graduation</option> <option value='Post Graduation'>Post Graduation</option> <option value='Doctrate'>Doctorate</option> <option value='Technical Qualification'>Technical Qualification</option> </select> <br> <label>Specify</label> <input type="text" name="Specify" id="Specify" placeholder='Certificate Details With Registration Number'> <label>Upload Document</label> <input type="file" name="fileToUpload" id="fileToUpload"> <button type="submit" value="" id="btn" name="submit" class='btn btn-info'>Upload Document</button> </form> </body> </html> <script> document.getElementById('btn').addEventListener("click", function(){ this.classList.add("loading"); this.innerHTML = "Loading..."; }); </script>