403Webshell
Server IP : 185.11.201.71  /  Your IP : 192.168.7.18
Web Server : Apache/2.4.29 (Ubuntu)
System : Linux tech-virtual-machine 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : tech ( 1000)
PHP Version : 7.4.28
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wordpress/App/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wordpress/App/pages/generatepo.html
<!DOCTYPE html>
<html>
	    <head>
  <meta http-equiv="Expires" content="0">
  <meta http-equiv="Last-Modified" content="0">
  <meta http-equiv="Cache-Control" content="no-cache, mustrevalidate">
  <meta http-equiv="Pragma" content="no-cache">
  <style>
	  .draggable:hover {
	  background-color: #f6f8ff;
	  cursor:pointer;
	}
  </style>
  
  </head>
	<body>
	
  <main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
    <div class="container-fluid py-4">
      <div class="row">
	  
	  
	  <div class="col-4">
          <div class="card mb-4">
			
            <div class="card-body px-0 pt-0 pb-2">
              <div class="table-responsive p-0">
				<div class="col-xl-12 col-md-12 mb-xl-0 mb-4" >
                  <div class="card h-100 card-plain border" style="margin: 10px;"> 
                    <div class="card-body d-flex flex-column justify-content-center text-center">
          
            
                         <h6>Available designs</h6>
      
	
             
					 <ul class="list-group" id="draggableList">
							
					 </ul>
                    
                    </div>
                  </div>
                </div>
				

              </div>
            </div>
			
          </div>
		 	
        </div>
	  
		
		<div class="col-8">
          <div class="card mb-4">
			
            <div class="card-body px-0 pt-0 pb-2">
              <div class="table-responsive p-0">
				<div class="col-xl-12 col-md-12 mb-xl-0 mb-4" id="dropCard">
                  <div class="card h-100 card-plain border" style="margin: 10px;"> 
                    <div class="card-body d-flex flex-column justify-content-center text-center" id="drop_zone" ondrop="drop(event)" ondragover="allowDrop(event)">
                      <a href="javascript:;">
                        <i class="fa fa-plus text-secondary mb-3"></i>
                        <h5 class=" text-secondary"> Drop Designs </h5>
                      </a>
                    </div>
                  </div>
                </div>
				
				<div class="col-xl-12 col-md-12 mb-xl-0 mb-4" id="dropList" style="display:none">
                  <div class="card h-100" style="margin: 10px;">
						<div class="card-header pb-0 p-3">
						  <h6 class="mb-0">Configure</h6>
						</div> 
						<div class="card-body p-3">
						  <div  id="itemList">
							
						  </ul>
						</div>						
						<button type="button" style="margin: auto;" type="button" class="btn bg-gradient-secondary" onclick="callFingerTip()">Confirm</button>
						<pre id="orderdetail"></pre>
					  </div>
                </div>
              </div>
            </div>
			
          </div>
		 	
        </div>
	
      </div>
    </div>
   
  </main>
  
  	</body>
</html>

  <script>
  

		var token = localStorage.getItem('tokenT2T');
		$.ajax({
			type:"GET", // la variable type guarda el tipo de la peticion GET,POST,..
			url:"https://t2tapi.tech-impulse.com/t2t-api/public/api/auth/designs", //url guarda la ruta hacia donde se hace la peticion
			headers:{'Authorization': 'Bearer ' + token}, // data recive un objeto con la informacion que se enviara al servidor
			success:function(datos){ //success es una funcion que se utiliza si el servidor retorna informacion
				 console.log(datos);
				 if(datos != null) {
					console.log(datos);
						jQuery.each(datos.Designs, function(i, val) {
						objeto = val;
						  console.log('lala' + val);
						  html = '<li class="list-group-item draggable" id="'+val.serial+'"  value="'+val.id+'" draggable="true" ondragstart="drag(event)">'+
						  '<img  unselectable="on" draggable="false" (dragstart)="false;"  src="'+val.image_path+'" class="avatar avatar-xxl unselectable rounded-circle me-2" alt="Jacket">'+val.serial+'<br>'+
						  //val.digital_id+
						  '</li><br>';
						  $('#draggableList').append(html); 
						});
					
					
				 } else {
					alert("No data");
				 }
			 },
			dataType: "json" // El tipo de datos esperados del servidor. Valor predeterminado: Intelligent Guess (xml, json, script, text, html).
		});
    
	
	function allowDrop(ev) {
	  ev.preventDefault();
	}

	function drag(ev) {
	  ev.dataTransfer.setData("text", ev.target.id);
	   ev.dataTransfer.setData("id", ev.target.value);
	}

	function drop(ev) {
	//$("#dropCard").hide();
	$("#dropList").show();
	console.log('Fichero(s) arrastrados');

	// Evitar el comportamiendo por defecto (Evitar que el fichero se abra/ejecute)
	ev.preventDefault();
 
	if (ev.dataTransfer.items) {
		//$("#itemList").empty();
		ev.preventDefault();
		//var data = ev.dataTransfer.getData("text");
		
		//ev.target.appendChild(document.getElementById(data));
		
		var data = {};
		data.id = "1111"+ev.dataTransfer.getData("id");
		data.name = ev.dataTransfer.getData("text");
	
		var html = '<div class="form-group"  id="'+data.id+'">'+
					'<div class="input-group">'+
				  '<button class="btn btn-outline-secondary mb-0" type="button">'+data.name+'</button>'+
				  '<input type="text" class="form-control" placeholder="Quantity" id="quantityV" aria-label="Quantity" >'+
				  '<select id="company" class="form-select" name="company">';
		$.ajax({
			type:"GET", // la variable type guarda el tipo de la peticion GET,POST,..
			url:"https://t2tapi.tech-impulse.com/t2t-api/public/api/auth/companies", //url guarda la ruta hacia donde se hace la peticion
			headers:{'Authorization': 'Bearer ' + token}, // data recive un objeto con la informacion que se enviara al servidor
			success:function(datos){ //success es una funcion que se utiliza si el servidor retorna informacion
				 console.log(datos);
				 if(datos != null) {
					console.log(datos);
					jQuery.each(datos.Companies, function(i, val) {
						objeto = val;
						console.log("hola");
						html += '<option value="' + val.id +'">' + val.name + '</option>';
					});
					html += '</select>'+
						'<button class="btn btn-outline-primary mb-0" type="button" id="button-addon2" onclick="deleteElement('+data.id+')">Delete</button>'+
						'</div>'+ 
						'</div>';
					$("#itemList").append(html);
				 } else {
					alert("No data");
				 }
			 },
			dataType: "json" // El tipo de datos esperados del servidor. Valor predeterminado: Intelligent Guess (xml, json, script, text, html).
		});
	}
} 

function deleteElement(id){
	$("#"+id).remove();
}
function callFingerTip(){
valueQ =  $("#quantityV").val()
var po = {
    "orders": {
        "external_reference": "t2t",
        "status": "active",
        "to_be_delivered_at": "2022-07-29T01:50:02.530Z",
        "property_value": {
            "values": [
                {
                    "name": "Total Quantity",
                    "key": "totalQuantity",
                    "data_type": "text",
                    "value": valueQ,
                    "required": false
                },
                {
                    "name": "Digital ID",
                    "key": "digitalId",
                    "data_type": "text",
                    "value": "N20033",
                    "required": true
                }
            ],
            "template_reference": {
                "name": "",
                "id": ""
            }
        },
        "is_template": false
    },
    "collaborations": [
        {
            "user_id": "d1085ba6-1fbb-4ac0-b07e-b812f076f7e3",
            "is_template": false,
            "roles": {
                "role": "owner"
            }
        }
    ]
};


document.getElementById("orderdetail").textContent = JSON.stringify(po, undefined, 2);
	Swal.fire({
		  title: 'Work in progress',
		  text: po,
		  didOpen: function () {
			Swal.showLoading();
			//fingerTipConnection();
			// AJAX request simulated with setTimeout
			console.log("moha "+id_token)
			$.ajax({
				contentType: 'application/json',
				type: "POST", // la variable type guarda el tipo de la peticion GET,POST,..
				url: "https://demo.api.getfingertip.io/v1/orders", //url guarda la ruta hacia donde se hace la peticion
				headers: { 'Authorization': 'Bearer ' + id_token }, // data recive un objeto con la informacion que se enviara al servidor
				data:JSON.stringify(po),
				success: function (datos) { //success es una funcion que se utiliza si el servidor retorna informacion
				console.log(datos);
				loadModule(2, null)
				},
				dataType: "json" // El tipo de datos esperados del servidor. Valor predeterminado: Intelligent Guess (xml, json, script, text, html).
			})
			setTimeout(function () {
			  Swal.close()
			}, 1000)
		  }
		});
}

function fingerTipConnection()
{

$.ajax({
	  crossDomain: true,
	  url: "https://demo.api.getfingertip.io/v1/users/token",
	  method: "POST",
	  headers: {
		"content-type": "application/json",
		"cache-control": "no-cache",
		"postman-token": "6d7ed1bb-a5fc-c2c9-857d-d5d2b7eaf751"
	  },
	 data: "{\r\n  \"uid\": \"griPlCSPdhVRo0UW2NlIo6Vtrn62\"\r\n}",
	success:function(datos){ //success es una funcion que se utiliza si el servidor retorna informacion
		 console.log(datos);
		 if(datos != null) {
			console.log('Fingertip: ' + datos);	
objeto = datos;			
			//getFingertipProfile(datos);
			
		 } else {
			console.log("Error fingerTipConnection");
		 }
	 },
	dataType: "json" // El tipo de datos esperados del servidor. Valor predeterminado: Intelligent Guess (xml, json, script, text, html).
});
}
/*

Swagger user = fingertip
Swagger password = fingertip



Step1: get access token
https://demo.api.getfingertip.io/api/#/users/UsersController_token
with uid = Hh20CFI6qbUJY5xtQllv9gcpRoo1

Step2: get user profile
https://demo.api.getfingertip.io/api/#/users/UsersController_profile
with bearer token (created above)

Step3: create order (POST)
https://demo.api.getfingertip.io/api/#/orders/OrdersController_create
with bearer token (created above)

Step4: get order detail
https://demo.api.getfingertip.io/api/#/orders/OrdersController_findOne
with bearer token (created above)

*/

  </script>

Youez - 2016 - github.com/yon3zu
LinuXploit