One Hat Cyber Team
Your IP :
172.69.130.199
Server IP :
188.114.96.4
Server :
Linux thuru 6.5.11-4-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-4 (2023-11-20T10:19Z) x86_64
Server Software :
Apache/2.4.51 (Unix) OpenSSL/1.0.2k-fips
PHP Version :
7.3.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
thuruk
/
public_html
/
application
/
views
/
View File Name :
add_new_tree.php
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Thuru Kapakaru | Add New Tree</title> <link href="<?php echo base_url();?>public/assets/css/bootstrap.css" rel="stylesheet"> <link href="<?php echo base_url();?>public/assets/css/style.css" rel="stylesheet"> <link href="<?php echo base_url();?>public/assets/css/revolution-slider.css" rel="stylesheet"> <link href="<?php echo base_url();?>public/assets/css/mystyle.css" rel="stylesheet"> <link href="<?php echo base_url();?>public/assets/css/main.css" rel="stylesheet"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <link href="<?php echo base_url();?>public/assets/css/responsive.css" rel="stylesheet"> <script src="https://raw.githubusercontent.com/mebjas/html5-qrcode/master/minified/html5-qrcode.min.js"></script> <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <!--[if lt IE 9]><script src="js/respond.js"></script><![endif]--> <?php $page='add-new-tree'; ?> </head> <body> <div class="page-wrapper"> <!-- Preloader --> <!-- <div class="preloader"></div> --> <?php // $path = $_SERVER['DOCUMENT_ROOT']; $path = "/resources/includes/header.php"; /*$path .= */ require_once(__DIR__.$path); ?> <!--End Main Header --> <!--Page Title--> <!-- <section class="page-title" style="background-image:url(<?php echo base_url();?>public/assets/images/background/page-title-bg.jpg);"> <div class="auto-container"> <div class="sec-title"> <h1>Add <span class="normal-font"></span> New Tree</h1> </div> </div> </section> --> <!--Default Section / Other Info--> <section class="default-section other-info"> <div class="auto-container"> <div class="row clearfix"> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet"> <div class="container"> <div class="row"> <!-- BEGIN SEARCH RESULT --> <div class="col-md-12"> <div class="row"> <!-- BEGIN RESULT --> <div class="col-md-12"> <div id="reader"></div> <!-- <section class="choose-location"> <h2>Select method for choose your location</h2> <form> <input type="radio" id="auto" name="option" value="auto"> <label for="auto">Automatically</label><br> <input type="radio" id="auto" name="option" value="auto"> <label for="auto">Manual</label><br> </form> </section> --> <section class="registration-section"> <!-- <?php echo form_open_multipart('CreateTree/AddPlant');?> --> <?php echo validation_errors(); ?> <form id="regForm" method="post" enctype="multipart/form-data"> <?php if($message =="success"){ echo "<p style='color:green'>Successfully uploaded</p>"; } else if($message=="fail"){ echo "<p style='color:green'>Please Try again</p>"; } ?> <h1>Plant New Tree</h1> <br><br> <!-- One "tab" for each step in the form: --> <div class="tab">QR Code: Hey there! <p><input placeholder="Serial Number" name="qr_code" oninput="this.className = ''"></p><br> Plant name: Select > <select class="form-control" name="plant_name" onchange="showOtherNmae(this.value)"> <option>Select Tile</option> <?php $connect = mysqli_connect("localhost","thuruk_thuruus","n5zmEf1V1aiH","thuruk_thurudb"); $query ="SELECT * FROM `tree_name`"; $result = mysqli_query($connect,$query); while($row = mysqli_fetch_assoc($result)){ echo ' <option>'.$row['name'].'</option>'; } ?> </select> <!-- <select class="form-control" id="sel1" name="plant_name" onchange="showOtherNmae(this.value)"> <option>කරඳ ශාකය Karanda Tree புங்கை மரம</option> <option>මී ගස Mee Tree இலுப்கப மரம்</option> <option>අඹ ගස Mango Tree மா மரம்</option> <option>නා ගස Naa Tree நாகை மரம்</option> <option>හල්මිල්ල ගස Halmilla Tree ஹல்மில்ல மரம</option> <option>කොහොඹ ගස Khomba Tree வவப்பமரம்</option> <option>කොස් ගස Jack Tree பலா மரம்</option> <option>නුග ගස Nuga Tree ஆலமரம</option> <option>Other</option> </select>--> <div class="row" id="plantName" style="display:none"> <!-- <div class="form-group has-label col-md-6" > <label class="pb-1"> Other Plant Name <star class="star">*</star> </label> <input type="text" class="form-control " name="other_plant_name" placeholder="Plant Name"/> </div> --> </div> Description: <p><input placeholder="Enter Description" name="description" oninput="this.className = ''"></p><br> Size: <p><input placeholder="Height of the Tree" oninput="this.className = ''"></p> </div> <div class="tab">Location: <div onclick="showPosition()" id="result"></div> <select class="form-control" id="sel1" name="location" onchange="showOtherNmae(this.value)"> <option value="Jaffna">Jaffna</option> <option value="Kilinochchi">Kilinochchi</option> <option value="Mannar">Mannar</option> <option value="Mullaitivu">Mullaitivu</option> <option value="Vavuniya">Vavuniya</option> <option value="Puttalam">Puttalam</option> <option value="Kurunegala">Kurunegala</option> <option value="Gampaha">Gampaha</option> <option value="Colombo">Colombo</option> <option value="Kalutara">Kalutara</option> <option value="Anuradhapura">Anuradhapura</option> <option value="Polonnaruwa">Polonnaruwa</option> <option value="Matale">Matale</option> <option value="Kandy">Kandy</option> <option value="Nuwara Eliya">Nuwara Eliya</option> <option value="Kegalle">Kegalle</option> <option value="Ratnapura">Ratnapura</option> <option value="Trincomalee">Trincomalee</option> <option value="Batticaloa">Batticaloa</option> <option value="Ampara">Ampara</option> <option value="Monaragala">Monaragala</option> <option value="Hambantota">Hambantota</option> <option value="Matara">Matara</option> <option value="Galle">Galle</option> </select> Latitude: <p><input placeholder="Latitude of the Tree" name="lat" oninput="this.className = ''"></p> Longitude: <p><input placeholder="Longitude of the Tree" name="long" oninput="this.className = ''"></p> </div> <div class="tab">Add photo: <img id="blah" src="#" alt="your image" /> <input type='file' name = "plant_image" onchange="readURL(this);" /> <!-- <input type="file" name = "plant_image" /> --> <!-- <p><input placeholder="Add your image here" type="file" name="plant_image" oninput="this.className = ''"></p> --> </div> <div style="overflow:auto;"> <div style="float:right;"> <button type="button" id="prevBtn" onclick="nextPrev(-1)">Previous</button> <button type="button" id="nextBtn" onclick="nextPrev(1)" >Next</button> </div> </div> <!-- Circles which indicates the steps of the form: --> <div style="text-align:center;margin-top:40px;"> <span class="step"></span> <span class="step"></span> <span class="step"></span> </div> </form> </section> </div> <!-- END RESULT --> </div> </div> </div> </div> <!-- END SEARCH RESULT --> </div> </div> </section> <!--Main Footer--> <?php include __DIR__.'/resources/includes/footer.php'; ?> </div> <!--End pagewrapper--> <!--Donate Popup--> <div class="modal fade pop-box" id="donate-popup" tabindex="-1" role="dialog" aria-labelledby="donate-popup" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <!--Donation Section--> <section class="donation-section"> <div class="donation-form-outer"> <form method="post" action="contact.html"> <!--Form Portlet--> <div class="form-portlet"> <h3>How Much Would you like to Donate?</h3> <div class="row clearfix"> <div class="form-group col-lg-7 col-md-12 col-xs-12 clearfix"> <div class="radio-select"> <input type="radio" name="sel-amount" id="amount-1"> <label for="amount-1">$10</label> </div> <div class="radio-select"> <input type="radio" name="sel-amount" id="amount-2" checked> <label for="amount-2">$25</label> </div> <div class="radio-select"> <input type="radio" name="sel-amount" id="amount-3"> <label for="amount-3">$50</label> </div> <div class="radio-select"> <input type="radio" name="sel-amount" id="amount-4"> <label for="amount-4">$100</label> </div> <div class="radio-select"> <input type="radio" name="sel-amount" id="amount-5"> <label for="amount-5">$150</label> </div> </div> <div class="form-group other-amount col-lg-5 col-md-8 col-xs-12 padd-top-10"> <input type="text" name="other-amount" value="" placeholder="Or Other Amount"> </div> </div> </div> <br> <!--Form Portlet--> <div class="form-portlet"> <h4>Billing Information</h4> <div class="row clearfix"> <div class="form-group col-lg-6 col-md-6 col-xs-12"> <div class="field-label">First Name <span class="required">*</span></div> <input type="text" name="name" value="" placeholder="First Name" required> </div> <div class="form-group col-lg-6 col-md-6 col-xs-12"> <div class="field-label">Last Name <span class="required">*</span></div> <input type="text" name="name" value="" placeholder="Last Name" required> </div> <div class="form-group col-lg-6 col-md-6 col-xs-12"> <div class="field-label">Email <span class="required">*</span></div> <input type="email" name="name" value="" placeholder="Email" required> </div> <div class="form-group col-lg-6 col-md-6 col-xs-12"> <div class="field-label">Phone <span class="required">*</span></div> <input type="text" name="name" value="" placeholder="Phone" required> </div> <div class="form-group col-lg-6 col-md-6 col-xs-12"> <div class="field-label">Address 1 <span class="required">*</span></div> <input type="text" name="name" value="" placeholder="Address 1" required> </div> <div class="form-group col-lg-6 col-md-6 col-xs-12"> <div class="field-label">Address 2 <span class="required">*</span></div> <input type="text" name="name" value="" placeholder="Address 2" required> </div> </div> </div> <br> <!--Form Portlet--> <div class="form-portlet"> <h4>Payment Information</h4> <div class="payment-option-logo"><img class="img-responsive" src="../images/resource/payment-logos.png" alt=""></div> <br> <div class="row clearfix"> <div class="form-group col-lg-6 col-md-6 col-xs-12"> <div class="field-label">Card Number <span class="required">*</span></div> <input type="text" name="name" value="" placeholder="Card Number" required> </div> <div class="form-group col-lg-6 col-md-6 col-xs-12"> <div class="field-label">Card Holder Name <span class="required">*</span></div> <input type="text" name="name" value="" placeholder="Card Holder Name" required> </div> <div class="form-group col-lg-3 col-md-3 col-xs-12"> <div class="field-label">Expire Date <span class="required">*</span></div> <select> <option>01</option> <option>02</option> <option>03</option> <option>04</option> <option>05</option> <option>06</option> <option>07</option> <option>08</option> <option>09</option> <option>10</option> <option>11</option> <option>12</option> </select> </div> <div class="form-group col-lg-3 col-md-3 col-xs-12"> <div class="field-label"> </div> <select> <option>2016</option> <option>2017</option> <option>2018</option> <option>2019</option> <option>2020</option> </select> </div> <div class="form-group col-lg-6 col-md-6 col-xs-12"> <div class="field-label">Security Code (CVC) <span class="required">*</span></div> <input type="text" name="name" value="" placeholder="Security Code" required> </div> </div> </div> <div class="text-left"><button type="submit" class="theme-btn btn-style-two">Donate Now</button></div> </form> </div> </section> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- /.modal --> <!--registration js--> <script> var currentTab = 0; // Current tab is set to be the first tab (0) showTab(currentTab); // Display the current tab function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#blah') .attr('src', e.target.result) .width(150) .height(200); }; reader.readAsDataURL(input.files[0]); } } function showOtherNmae(value){ if(value =="Other"){ document.getElementById('plantName').style.display = 'block'; }else{ document.getElementById('plantName').style.display = 'none'; } } function showTab(n) { // This function will display the specified tab of the form ... var x = document.getElementsByClassName("tab"); x[n].style.display = "block"; // ... and fix the Previous/Next buttons: if (n == 0) { document.getElementById("prevBtn").style.display = "none"; } else { document.getElementById("prevBtn").style.display = "inline"; } if (n == (x.length - 1)) { document.getElementById("nextBtn").innerHTML = "Submit"; } else { document.getElementById("nextBtn").innerHTML = "Next"; } // ... and run a function that displays the correct step indicator: fixStepIndicator(n) } function nextPrev(n) { // This function will figure out which tab to display var x = document.getElementsByClassName("tab"); // Exit the function if any field in the current tab is invalid: if (n == 1 && !validateForm()) return false; // Hide the current tab: x[currentTab].style.display = "none"; // Increase or decrease the current tab by 1: currentTab = currentTab + n; // if you have reached the end of the form... : if (currentTab >= x.length) { //...the form gets submitted: document.getElementById("regForm").submit(); return false; } // Otherwise, display the correct tab: showTab(currentTab); } function showPosition() { if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var positionInfo = "Your current position is (" + "Latitude: " + position.coords.latitude + ", " + "Longitude: " + position.coords.longitude + ")"; document.getElementById("result").innerHTML = positionInfo; codeLatLng(position.coords.latitude,position.coords.longitude); }); } else { alert("Sorry, your browser does not support HTML5 geolocation."); } } function codeLatLng(lat, lng) { var latlng = new google.maps.LatLng(lat, lng); geocoder.geocode({'latLng': latlng}, function(results, status) { alert(result); if (status == google.maps.GeocoderStatus.OK) { console.log(results) if (results[1]) { //formatted address alert(results[0].formatted_address) //find country name for (var i=0; i<results[0].address_components.length; i++) { for (var b=0;b<results[0].address_components[i].types.length;b++) { //there are different types that might hold a city admin_area_lvl_1 usually does in come cases looking for sublocality type will be more appropriate if (results[0].address_components[i].types[b] == "administrative_area_level_1") { //this is the object you are looking for city= results[0].address_components[i]; break; } } } //city data alert(city.short_name + " " + city.long_name) } else { alert("No results found"); } } else { alert("Geocoder failed due to: " + status); } }); } function validateForm() { // This function deals with validation of the form fields var x, y, i, valid = true; x = document.getElementsByClassName("tab"); y = x[currentTab].getElementsByTagName("input"); // A loop that checks every input field in the current tab: for (i = 0; i < y.length; i++) { // If a field is empty... if (y[i].value == "") { // add an "invalid" class to the field: y[i].className += " invalid"; // and set the current valid status to false: valid = false; } } // If the valid status is true, mark the step as finished and valid: if (valid) { document.getElementsByClassName("step")[currentTab].className += " finish"; } return valid; // return the valid status } function fixStepIndicator(n) { // This function removes the "active" class of all steps... var i, x = document.getElementsByClassName("step"); for (i = 0; i < x.length; i++) { x[i].className = x[i].className.replace(" active", ""); } //... and adds the "active" class to the current step: x[n].className += " active"; } </script> <!-- <script type="module"> import QrScanner from "<?php echo base_url();?>public/qr/qr-scanner.min.js"; QrScanner.WORKER_PATH = '<?php echo base_url();?>public/qr/qr-scanner-worker.min.js'; const video = document.getElementById('qr-video'); const camHasCamera = document.getElementById('cam-has-camera'); const camHasFlash = document.getElementById('cam-has-flash'); const flashToggle = document.getElementById('flash-toggle'); const flashState = document.getElementById('flash-state'); const camQrResult = document.getElementById('cam-qr-result'); const camQrResultTimestamp = document.getElementById('cam-qr-result-timestamp'); const fileSelector = document.getElementById('file-selector'); const fileQrResult = document.getElementById('file-qr-result'); function setResult(label, result) { label.textContent = result; camQrResultTimestamp.textContent = new Date().toString(); label.style.color = 'teal'; clearTimeout(label.highlightTimeout); label.highlightTimeout = setTimeout(() => label.style.color = 'inherit', 100); } // ####### Web Cam Scanning ####### QrScanner.hasCamera().then(hasCamera => camHasCamera.textContent = hasCamera); const scanner = new QrScanner(video, result => setResult(camQrResult, result), error => { camQrResult.textContent = error; camQrResult.style.color = 'inherit'; }); scanner.start().then(() => { scanner.hasFlash().then(hasFlash => { camHasFlash.textContent = hasFlash; if (hasFlash) { flashToggle.style.display = 'inline-block'; flashToggle.addEventListener('click', () => { scanner.toggleFlash().then(() => flashState.textContent = scanner.isFlashOn() ? 'on' : 'off'); }); } }); }); // for debugging window.scanner = scanner; document.getElementById('show-scan-region').addEventListener('change', (e) => { const input = e.target; const label = input.parentNode; label.parentNode.insertBefore(scanner.$canvas, label.nextSibling); scanner.$canvas.style.display = input.checked ? 'block' : 'none'; }); document.getElementById('inversion-mode-select').addEventListener('change', event => { scanner.setInversionMode(event.target.value); }); document.getElementById('start-button').addEventListener('click', () => { scanner.start(); }); document.getElementById('stop-button').addEventListener('click', () => { scanner.stop(); }); // ####### File Scanning ####### fileSelector.addEventListener('change', event => { const file = fileSelector.files[0]; if (!file) { return; } QrScanner.scanImage(file) .then(result => setResult(fileQrResult, result)) .catch(e => setResult(fileQrResult, e || 'No QR code found.')); }); </script> --> <script src="<?php echo base_url();?>public/assets/js/jquery.js"></script> <script src="<?php echo base_url();?>public/assets/js/bootstrap.min.js"></script> <script src="<?php echo base_url();?>public/assets/js/revolution.min.js"></script> <script src="<?php echo base_url();?>public/assets/js/jquery.fancybox.pack.js"></script> <script src="<?php echo base_url();?>public/assets/js/jquery.fancybox-media.js"></script> <script src="<?php echo base_url();?>public/assets/js/owl.js"></script> <script src="<?php echo base_url();?>public/assets/js/wow.js"></script> <script src="<?php echo base_url();?>public/assets/js/script.js"></script> <script src="http://code.jquery.com/jquery-1.10.2.js"></script> <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> </body> </html>