Server IP : 162.240.98.243 / Your IP : 18.220.139.168 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"); // $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['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}')"); } } } } ?> <style> .switch { position: relative; display: inline-block; width: 90px; height: 34px; } .switch input {display:none;} .slider5 { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ca2222; -webkit-transition: .4s; transition: .4s; border-radius: 34px; } .slider5:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; -webkit-transition: .4s; transition: .4s; border-radius: 50%; } input:checked + .slider5 { background-color: #2ab934; } input:focus + .slider5 { box-shadow: 0 0 1px #2196F3; } input:checked + .slider5:before { -webkit-transform: translateX(26px); -ms-transform: translateX(26px); transform: translateX(55px); } /*------ ADDED CSS ---------*/ .slider5:after { content:'Undone'; color: white; display: block; position: absolute; transform: translate(-50%,-50%); top: 50%; left: 50%; font-size: 10px; font-family: Verdana, sans-serif; } input:checked + .slider5:after { content:'Done'; } .center { border: 1px solid grey; text-align:; } .box2{ display: none; } .center { border: 1px solid grey; text-align:; } .center2 { border: 5px solid grey; text-align:; } </style> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <style> .center { border: 1px solid grey; text-align:; } </style> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script> $(document).ready(function(){ $("select").change(function(){ $(this).find("option:selected").each(function(){ var optionValue = $(this).attr("value"); if(optionValue){ $(".box").not("." + optionValue).hide(); $("." + optionValue).show(); } else{ $(".box").hide(); } }); }).change(); }); </script> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> <title>Document</title> <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> </head> <body> <div class='center'> <div style = "display:none;" id = "loaderImg"> <div class="loader"> </div> </div> <form name="GeneralConsent" method="post" id="GeneralConsentForm" enctype="multipart/form-data"> <input type='hidden' name='towords' value='Null'/> <div> <label for="item">Upload Consent<span>*</span> <input name="Upload_Consent[]" type="file" multiple> </div> <div> <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> </div> <br> <input type="submit" name="GeneralConsent" value="Submit"> </form> </div> </body> </html>