Server IP : 162.240.98.243 / Your IP : 18.117.73.127 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/FO/Patient/ |
Upload File : |
<?php 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}')"); } } } } ?> <div class='row'> <br> <div class='col-sm-12'> <form name="GeneralConsent" method="post" id="GeneralConsentForm" enctype="multipart/form-data"> <input type='hidden' name='towords' value='Null'/> <table class='table table-hover table-bordered'> <tr><td><label for="item">Upload Consent<span>*</span></td><td><input name="Upload_Consent[]" type="file" multiple class="form-control"></td></tr> <tr><td></td></td><td><a href='showGeneralConsent.php?prescriptionid=<?php echo $_GET['prescriptionid'] ?>&patientid=<?php echo $_GET['patientid'] ?>' class='btn btn-info' style='border-radius: 12px;'> Download Consent Formate</a></td></tr> <tr><td colspan='2'><input type="submit" name="GeneralConsent" value="Submit" class='btn btn-success'></td></tr> </table> </form> </div> </div>