Server IP : 162.240.98.243 / Your IP : 3.22.70.206 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/www/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"); if(isset($_GET['Del'])){ $GCDel=$con->query("DELETE FROM GeneralConsent WHERE id='$_GET[Del]'"); if($GCDel==1){ echo "<script>alert('Delete successfully..');</script><script>window.location='Add_Gen_Con_Sign_Img.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]'</script>;</script>"; } } if(isset($_POST['GeneralConsent'])) { // 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::GeneralConsent("$_GET[prescriptionid]","$_GET[patientid]","$_POST[towords]","$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}')"); } } } } ?> <meta name="viewport" content="width=device-width, initial-scale=1"> <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.7.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.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"> <div style = "display:none;" id = "loaderImg"> <div class="loader"> </div> </div> <form name="GeneralConsent" method="post" id="GeneralConsentForm" enctype="multipart/form-data"> <?php $sql ="SELECT * FROM GeneralConsent WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'"; $qsql = mysqli_query($con,$sql); $rs = mysqli_fetch_array($qsql); ?> <select name="towords" class="form-control" > <option value="">Towords</option> <option value='Treatment'<?php echo($rs['towords']=='Treatment')?"selected":""; ?>>Treatment</option> <option value='Investigation' <?php echo($rs['towords']=='Investigation')?"selected":""; ?>>Investigation</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%"> <span style="color:white">Download Consent Formate</span> </Button> </div> <br> <?php echo"<div class='row'>"; $GeneralConsent=$con->query("SELECT * FROM GeneralConsent WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'"); while($GC=$GeneralConsent->fetch_assoc()){ echo "<div class='col-sm-3'> <div class='img-thumbnail'> <a target='_blank' href='uploads/$GC[Upload_Consent]'><image src='uploads/$GC[Upload_Consent]' alt='img' class='' style='width:150px; height:150px;'></a><br> <center><a href='Add_Gen_Con_Sign_Img.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&Del=$GC[id]' style='text-align: center;'>Delete</a></center> </div> </div> "; } echo "</div>"; ?> <br><br> <input type="submit" name="GeneralConsent" value="Submit"> </form>