/
var
/
www
/
html
/
stengineers
/
Upload FileeE
HOME
<?php header('Access-Control-Allow-Origin: *'); require_once('admin/dbconnection.php'); error_reporting(0); $job_id = $_GET['id']; $row1 = mysqli_query($con, "select * from job_details as a where a.id='$job_id'"); $row2 = mysqli_fetch_array($row1); $jobcode = $row2['jobcode']; $bcontent = $row2['jobdesc']; $designation = $row2['designation']; $experience = $row2['experience']; $jobtype = $row2['jobtype']; $education = $row2['education']; $location = $row2['location']; $fieldexp = $row2['fieldexp']; $status = $row2['status']; $created_at = $row2['created_at']; $now = time(); // or your date as well $days = time_elapsed_string($created_at); $pagetitle = "ST Engineers - Careers Details"; require 'header.php'; function time_elapsed_string($datetime, $full = false) { date_default_timezone_set("Asia/Kolkata"); $now = new DateTime; $ago = new DateTime($datetime); $diff = $now->diff($ago); $diff->w = floor($diff->d / 7); $diff->d -= $diff->w * 7; $string = array( 'y' => 'year', 'm' => 'month', 'w' => 'week', 'd' => 'day', 'h' => 'hour', 'i' => 'minute', 's' => 'second', ); foreach ($string as $k => &$v) { if ($diff->$k) { $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : ''); } else { unset($string[$k]); } } if (!$full) $string = array_slice($string, 0, 1); return $string ? implode(', ', $string) . ' ago' : 'just now'; } ?> <!-- Careers Details start --> <section class='careersDetailsMain'> <ol class="breadcrumb"> <li><a href="<?php echo $baseUrl; ?>">Home</a></li> <li><a href="<?php echo $baseUrl; ?>careers.php">Careers</a></li> <li class="current"><?php echo ucwords($designation); ?></li> </ol> <div class='greySection'> <h3><?php echo ucwords($designation); ?></h3> <svg xmlns="http://www.w3.org/2000/svg" width="18.65" height="16.392" viewBox="0 0 18.65 16.392"> <path id="portfolio" d="M18.107,2.186H13.15V1.639A1.641,1.641,0,0,0,11.511,0H7.14A1.641,1.641,0,0,0,5.5,1.639v.546H.547A.548.548,0,0,0,0,2.732V14.753a1.641,1.641,0,0,0,1.639,1.639H17.011a1.641,1.641,0,0,0,1.639-1.639V2.741a.53.53,0,0,0-.543-.556ZM6.593,1.639a.547.547,0,0,1,.546-.546h4.371a.547.547,0,0,1,.546.546v.546H6.593ZM17.346,3.278l-1.7,5.09a.545.545,0,0,1-.518.374H12.057V8.2a.546.546,0,0,0-.546-.546H7.14a.546.546,0,0,0-.546.546v.546H3.52A.545.545,0,0,1,3,8.369L1.3,3.278ZM10.964,8.742V9.835H7.686V8.742Zm6.593,6.01a.547.547,0,0,1-.546.546H1.639a.547.547,0,0,1-.546-.546V6.1l.872,2.615A1.637,1.637,0,0,0,3.52,9.835H6.593v.546a.546.546,0,0,0,.546.546h4.371a.546.546,0,0,0,.546-.546V9.835h3.074a1.637,1.637,0,0,0,1.555-1.121L17.558,6.1Zm0,0" transform="translate(0)"/> </svg> <span><?php echo ucwords($experience); ?></span> <span>|</span> <svg id="pin" xmlns="http://www.w3.org/2000/svg" width="13.676" height="18.511" viewBox="0 0 13.676 18.511"> <g id="Group_1234" data-name="Group 1234" transform="translate(0)"> <g id="Group_1233" data-name="Group 1233" transform="translate(0)"> <path id="Path_41819" data-name="Path 41819" d="M54.918,0A6.846,6.846,0,0,0,48.08,6.838a7.889,7.889,0,0,0,.58,2.633,11.028,11.028,0,0,0,.79,1.478l4.689,7.1a.892.892,0,0,0,1.558,0l4.689-7.1a10.98,10.98,0,0,0,.79-1.478,7.887,7.887,0,0,0,.58-2.633A6.846,6.846,0,0,0,54.918,0Zm5.517,9.159a10.1,10.1,0,0,1-.72,1.348l-4.689,7.1c-.093.14-.122.14-.214,0l-4.689-7.1a10.109,10.109,0,0,1-.72-1.348,7.162,7.162,0,0,1-.517-2.32,6.034,6.034,0,0,1,12.067,0A7.167,7.167,0,0,1,60.435,9.159Z" transform="translate(-48.08)"/> <path id="Path_41820" data-name="Path 41820" d="M115.7,64.008a3.62,3.62,0,1,0,3.62,3.62A3.624,3.624,0,0,0,115.7,64.008Zm0,6.436a2.816,2.816,0,1,1,2.816-2.816A2.819,2.819,0,0,1,115.7,70.444Z" transform="translate(-108.862 -60.79)"/> </g> </g> </svg> <span><?php echo ucwords($location); ?></span> <div class='greySectionSub'> <!-- <button class="greySectionSubBtn">Apply Now</button> --> <!--<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud--> <!--exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure.</p>--> <div class="about-btn1"> <a href="#" data-bs-target="#modalformjob" data-bs-toggle="modal" onclick="add_post_name('<?php echo ucwords($designation); ?>')" class="more-btn1" href="">Apply Now<img src="assets/images/home/btn-arrow.png" alt="" class="arrow-img1"></a> </div> </div> <hr/> <!--<p>Posted : <?php echo $days; ?> | Job Type : <?php echo ucwords($jobtype); ?> </p>--> <p>Field Experience : <?php echo ucwords($fieldexp); ?> </p> </div> <div class="sliverSection"> <h6 class="pt-2 pb-4">Job Description</h6> <?php echo ucwords($bcontent); ?> </div> <p class='mt-3 mb-3 cdpara'>Related Jobs</p> <div class="contentMainOverall"> <?php $l=0; $sql = "select * from job_details where status='active' order by rand() limit 3"; $selected = mysqli_query($con, $sql); while($row = mysqli_fetch_array($selected)) { ++$l; $id = $row['id']; $designation = $row['designation']; $experience = $row['experience']; $jobtype = $row['jobtype']; $jobdesc = $row['jobdesc']; $education = $row['education']; $location = $row['location']; $fieldexp = $row['fieldexp']; ?> <div class="contentMain"> <div class="contentOne"><a href="careers-details.php?id=<?php echo $id; ?>"><?php echo ucwords($designation); ?></a></div> <div class="contentTwo"> <svg xmlns="http://www.w3.org/2000/svg" width="18.65" height="16.392" viewBox="0 0 18.65 16.392"> <path id="portfolio" d="M18.107,2.186H13.15V1.639A1.641,1.641,0,0,0,11.511,0H7.14A1.641,1.641,0,0,0,5.5,1.639v.546H.547A.548.548,0,0,0,0,2.732V14.753a1.641,1.641,0,0,0,1.639,1.639H17.011a1.641,1.641,0,0,0,1.639-1.639V2.741a.53.53,0,0,0-.543-.556ZM6.593,1.639a.547.547,0,0,1,.546-.546h4.371a.547.547,0,0,1,.546.546v.546H6.593ZM17.346,3.278l-1.7,5.09a.545.545,0,0,1-.518.374H12.057V8.2a.546.546,0,0,0-.546-.546H7.14a.546.546,0,0,0-.546.546v.546H3.52A.545.545,0,0,1,3,8.369L1.3,3.278ZM10.964,8.742V9.835H7.686V8.742Zm6.593,6.01a.547.547,0,0,1-.546.546H1.639a.547.547,0,0,1-.546-.546V6.1l.872,2.615A1.637,1.637,0,0,0,3.52,9.835H6.593v.546a.546.546,0,0,0,.546.546h4.371a.546.546,0,0,0,.546-.546V9.835h3.074a1.637,1.637,0,0,0,1.555-1.121L17.558,6.1Zm0,0" transform="translate(0)"/> </svg> <span><?php echo ucwords($experience); ?></span> <span>|</span> <svg id="pin" xmlns="http://www.w3.org/2000/svg" width="13.676" height="18.511" viewBox="0 0 13.676 18.511"> <g id="Group_1234" data-name="Group 1234" transform="translate(0)"> <g id="Group_1233" data-name="Group 1233" transform="translate(0)"> <path id="Path_41819" data-name="Path 41819" d="M54.918,0A6.846,6.846,0,0,0,48.08,6.838a7.889,7.889,0,0,0,.58,2.633,11.028,11.028,0,0,0,.79,1.478l4.689,7.1a.892.892,0,0,0,1.558,0l4.689-7.1a10.98,10.98,0,0,0,.79-1.478,7.887,7.887,0,0,0,.58-2.633A6.846,6.846,0,0,0,54.918,0Zm5.517,9.159a10.1,10.1,0,0,1-.72,1.348l-4.689,7.1c-.093.14-.122.14-.214,0l-4.689-7.1a10.109,10.109,0,0,1-.72-1.348,7.162,7.162,0,0,1-.517-2.32,6.034,6.034,0,0,1,12.067,0A7.167,7.167,0,0,1,60.435,9.159Z" transform="translate(-48.08)"/> <path id="Path_41820" data-name="Path 41820" d="M115.7,64.008a3.62,3.62,0,1,0,3.62,3.62A3.624,3.624,0,0,0,115.7,64.008Zm0,6.436a2.816,2.816,0,1,1,2.816-2.816A2.819,2.819,0,0,1,115.7,70.444Z" transform="translate(-108.862 -60.79)"/> </g> </g> </svg> <span> <?php echo ucwords($location); ?> </span> </div> </div> <?php } ?> </div> </section> <!-- Careers Details Ends --> <!-- ======= career popup modal form======= --> <div class="modal " id="modalformjob" tabindex="-1" aria-labelledby="modalformLabel" aria-hidden="true" > <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" id="close_btn" data-bs-dismiss="modal" aria-label="Close"> <img src="<?php echo $imageUrl; ?>cancel.png"> </button> <div class="form_sec centered_content" style="align-items:end;"> <input type="hidden" id="sdesig"> <form id="enq_form1" class="form-contact contact_form" method="post" enctype="multipart/form-data"> <p class="text-center"><b>Please complete the registration form below to continue your application process.</b></p> <div class="row"> <div class="col-md-12" style="padding: 10px;"> <div class="form-group"> <input type="text" id="c_name1" class="form-control" placeholder="Enter Your Name*"> <span style="color: red;" class="errorform" id="c_name_Err1"></span> </div> </div> <div class="col-md-12" style="padding: 10px;"> <input type="tel" id="c_mobile1" class="form-control " placeholder="Enter Your Mobile Number*"> <span style="color: red;" class="errorform" id="c_mobile_Err1"></span> </div> <div class="col-md-12" style="padding: 10px;"> <input type="email" id="c_email1" class="form-control" placeholder="Enter Your E-Mail*"> <span style="color: red;" class="errorform" id="c_email_Err1"></span> </div> <div class="col-md-12 _2acF7" style="padding: 10px;"> <div id="uploadfile"> <span><p style="text-align: left;">Select file to upload</p></span><p class="_2kMN1 aos-init aos-animate" data-aos="fade-up">Upload</p> </div> <input type="file" name="fileInput" accept=".pdf,.docx" id="fileInput" value=""> <p>only accept pdf,doc,docx </p> <input type="hidden" id="uploadfile_n"> <div style="color: red;font-size: 13px;margin: 0 auto;" id="uploadfile_n_Err1"></div> </div> </div> </div> <div class="text-center mx-auto"> <button type="button" class="boxed-btn" id="add-submit2" onclick="career()"> Submit</button></div> <!-- <div id="emailSendResult"></div> --> </form> <div id="succ-client-alert1" style='color:green ;padding: 2px 0px 0px 16px;'></div> <div id="fail-client-alert1" style='color:red ;padding: 6px 0px 0px 16px;'></div> </div> </div> </div> </div> </div> <!-- End Modal --> <script> function add_post_name(desig) { $("#sdesig").val(desig); } $(function(){ // File input field trigger when the HTML element is clicked $("#uploadfile").click(function(){ $("#fileInput").click(); }); // Prevent browsers from opening the file when its dragged and dropped $(document).on('drop dragover', function (e) { e.preventDefault(); }); // Call a function to handle file upload on select file $('input[type=file]').on('change', fileUpload); }); function fileUpload(event){ // Allowed file types var allowedFileTypes = 'image.*|application/pdf'; //text.*|image.*|application.* // Allowed file size var allowedFileSize = 1024; //in KB/ // Notify user about the file upload status $("#uploadfile").html(event.target.value+" uploading..."); // Get selected file files = event.target.files; // Form data check the above bullet for what it is var data = new FormData(); // File data is presented as an array for (var i = 0; i < files.length; i++) { var file = files[i]; if(!file.type.match(allowedFileTypes[0])) { // Check file type $("#uploadfile").html('<p class="error">File extension error! Please select the allowed file type only.</p>'); }else if(file.size > (allowedFileSize*1024)){ // Check file size (in bytes) $("#uploadfile").html('<p class="error">File size error! Sorry, (>'+allowedFileSize+'KB).</p>'); }else{ // Append the uploadable file to FormData object data.append('referer', "ezioaws"); data.append('action', "resume_upload"); data.append('file', file, file.name); // Create a new XMLHttpRequest var xhr = new XMLHttpRequest(); // Post file data for upload xhr.open('POST', 'admin/api/career.php', true); xhr.send(data); xhr.onload = function () { // Get response and show the uploading status var response = JSON.parse(xhr.responseText); if(xhr.status === 200 && response.status == 'success'){ $("#uploadfile").html('<p class="success">File has been uploaded successfully.</p>'); $("#uploadfile_n").val(response.message); }else if(response.status == 'type_err'){ $("#uploadfile").html('<p class="error">File extension error! Click to upload another file.</p>'); }else{ $("#uploadfile").html('<p class="error">Failed to Upload, Please try again.</p>'); } }; } } } </script> <?php require 'footer.php';?> <script>$('.timeline li').on('click', showTimelineBlock); $('.timeline-prev').on('click', prevTimeline); $('.timeline-next').on('click', nextTimeline); function showTimelineBlock() { var listNumber = $('.timeline li').index(this); var left = listNumber * -100; $('.timeline-blocks').animate({ marginLeft: left + '%'}, 500); $(".timeline li").removeClass("timeline-active"); $(this).addClass('timeline-active'); }; function nextTimeline () { $('.timeline-active').removeClass('timeline-active').next().addClass('timeline-active'); $('.timeline-blocks').animate({ marginLeft: "+=-100%"}, 500); }; function prevTimeline () { $('.timeline-active').removeClass('timeline-active').prev().addClass('timeline-active'); $('.timeline-blocks').animate({ marginLeft: "+=100%"}, 500); };</script>