Server IP : 162.240.98.243 / Your IP : 3.133.152.95 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/ |
Upload File : |
<?php session_start(); include 'dbconnection.php'; require_once("../patientmanager.php"); require_once("../DBManager.php"); include 'dashboarddocument.php'; include("header.php"); // $target_dir = "uploads/"; // $filename = basename($_FILES["Upload_Consent"]["name"]); // $target_file = $target_dir . basename($_FILES["Upload_Consent"]["name"]); // $uploadOk = 1; // $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION)); if(isset($_POST['Consent'])) { // Start of Image Upload foreach($_FILES["Upload_Consent"]["name"] as $key=>$val) { $info=getimagesize($_FILES['Upload_Consent']['tmp_name'][$key]); if(isset($info['mime'])){ if($info['mime']=="image/jpeg"){ $img=imagecreatefromjpeg($_FILES['Upload_Consent']['tmp_name'][$key]); } elseif($info['mime']=="image/png"){ $img=imagecreatefrompng($_FILES['Upload_Consent']['tmp_name'][$key]); } elseif($info['mime']=="image/gif"){ $img=imagecreatefromgif($_FILES['Upload_Consent']['tmp_name'][$key]); } elseif($info['mime']=="image/jpg"){ $img=imagecreatefromjpg($_FILES['Upload_Consent']['tmp_name'][$key]); } else{ echo "Only select jpg or png image"; } if(isset($img)){ $newFileName=$user_id.$email.$filename.$count.'.jpg'; $file = $newFileName.'_'.$val; imagejpeg($img, "uploads/$file" ,20); PatientManager::ALLConsent("$_GET[prescriptionid]","$_GET[patientid]","$_POST[consent]","$file","$_POST[entered_by]"); // $imagedata = mysqli_query($mysqli, "INSERT INTO ready_to_move_image(property_id, user_id, username, pro_image) values ('{$property_id}', '{$user_id}', '{$username}', '{$file}')"); } } } } ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#GeneralConsentForm').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; } @keyframes spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } </style> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <form name="GeneralConsent" id='ConsentForm' method="post" enctype="multipart/form-data"> <select class="form-control" name='consent'> <option value='Procedure_Consent'>Procedure Consent</option> <option value='Cost_Consent'>Cost Consent</option> <option value='Discharge_Consent'>Discharge Consent</option> <option value='LAMA_DOR Consent'>LAMA / DOR Consent</option> <option value='DNR_Consent'>DNR Consent</option> <option value='Anesthesia_Consent'>Anesthesia Consent</option> </select> <div> <label for="item">Upload Consent<span>*</span> <input name="Upload_Consent[]" type="file" multiple> </div> <div> <Button style="height:20%;width:20%">Download Consent Formate </Button> </div> <br> <input type="submit" name="Consent" value="Submit"> </form>