27 require
'../../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/product/stock/class/entrepot.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/modules/import/import_csv.modules.php';
35 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
36 require_once DOL_DOCUMENT_ROOT.
'/core/lib/import.lib.php';
38 $confirm =
GETPOST(
'confirm',
'alpha');
39 $filetoimport =
GETPOST(
'filetoimport');
42 $langs->loadLangs(array(
'products',
'stocks',
'orders',
'productbatch'));
45 $hookmanager->initHooks(array(
'massstockmove'));
49 $socid = $user->socid;
55 $action =
GETPOST(
'action',
'aZ09');
56 $id_product =
GETPOST(
'productid',
'int');
57 $id_sw =
GETPOST(
'id_sw',
'int');
58 $id_tw =
GETPOST(
'id_tw',
'int');
63 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
64 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
66 if (empty($page) || $page == -1) {
77 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
78 $offset = $limit * $page;
81 unset($_SESSION[
'massstockmove']);
83 $listofdata = array();
84 if (!empty($_SESSION[
'massstockmove'])) {
85 $listofdata = json_decode($_SESSION[
'massstockmove'],
true);
93 if ($action ==
'addline' && !empty($user->rights->stock->mouvement->creer)) {
103 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"WarehouseTarget")),
null,
'errors');
105 if ($id_sw > 0 && $id_tw == $id_sw) {
107 $langs->load(
"errors");
108 setEventMessages($langs->trans(
"ErrorWarehouseMustDiffers"),
null,
'errors');
110 if (!($id_product > 0)) {
112 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Product")),
null,
'errors');
116 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Qty")),
null,
'errors');
121 $producttmp =
new Product($db);
122 $producttmp->fetch($id_product);
123 if ($producttmp->hasbatch()) {
126 $langs->load(
"errors");
127 setEventMessages($langs->trans(
"ErrorTryToMakeMoveOnProductRequiringBatchData", $producttmp->ref),
null,
'errors');
136 if ($producttmp->hasbatch()) {
143 if (count(array_keys($listofdata)) > 0) {
144 $id = max(array_keys($listofdata)) + 1;
148 $listofdata[$id] = array(
'id'=>$id,
'id_product'=>$id_product,
'qty'=>$qty,
'id_sw'=>$id_sw,
'id_tw'=>$id_tw,
'batch'=>$batch);
149 $_SESSION[
'massstockmove'] = json_encode($listofdata);
159 if ($action ==
'delline' && $idline !=
'' && !empty($user->rights->stock->mouvement->creer)) {
160 if (!empty($listofdata[$idline])) {
161 unset($listofdata[$idline]);
163 if (count($listofdata) > 0) {
164 $_SESSION[
'massstockmove'] = json_encode($listofdata);
166 unset($_SESSION[
'massstockmove']);
170 if ($action ==
'createmovements' && !empty($user->rights->stock->mouvement->creer)) {
175 setEventMessages($langs->trans(
"ErrorFieldRequired"), $langs->transnoentitiesnoconv(
"MovementLabel"),
null,
'errors');
183 foreach ($listofdata as $key => $val) {
185 $id_product = $val[
'id_product'];
186 $id_sw = $val[
'id_sw'];
187 $id_tw = $val[
'id_tw'];
189 $batch = $val[
'batch'];
193 if (!$error && $id_sw <> $id_tw && is_numeric($qty) && $id_product) {
194 $result = $product->fetch($id_product);
196 $product->load_stock(
'novirtual');
200 if (!empty($product->pmp)) {
201 $pricesrc = $product->pmp;
203 $pricedest = $pricesrc;
207 if (empty($conf->productbatch->enabled) || !$product->hasbatch()) {
210 $result1 = $product->correct_stock(
226 $result2 = $product->correct_stock(
240 $arraybatchinfo = $product->loadBatchInfo($batch);
241 if (count($arraybatchinfo) > 0) {
242 $firstrecord = array_shift($arraybatchinfo);
243 $dlc = $firstrecord[
'eatby'];
244 $dluo = $firstrecord[
'sellby'];
257 $result1 = $product->correct_stock_batch(
276 $result2 = $product->correct_stock_batch(
302 unset($_SESSION[
'massstockmove']);
306 header(
"Location: ".DOL_URL_ROOT.
'/product/stock/index.php');
314 if ($action ==
'importCSV' && !empty($user->rights->stock->mouvement->creer)) {
318 $fullpath = $conf->stock->dir_temp.
"/".$user->id.
'-csvfiletotimport.csv';
320 dol_syslog(
"File ".$fullpath.
" was added for import");
323 $langs->load(
"errors");
328 $importcsv =
new ImportCsv($db,
'massstocklist');
331 $nblinesrecord = $importcsv->import_get_nb_of_lines($fullpath)-1;
332 $importcsv->import_open_file($fullpath);
333 $labelsrecord = $importcsv->import_read_record();
335 if ($nblinesrecord < 1) {
336 setEventMessages($langs->trans(
"BadNumberOfLinesMustHaveAtLeastOneLinePlusTitle"),
null,
'errors');
340 $productstatic =
new Product($db);
341 $warehousestatics =
new Entrepot($db);
342 $warehousestatict =
new Entrepot($db);
343 while (($i < $nblinesrecord) && !$error) {
344 $data[] = $importcsv->import_read_record();
345 if (count($data[$i]) == 1) {
352 $tmp_id_sw = $data[$i][0][
'val'];
353 $tmp_id_tw = $data[$i][1][
'val'];
354 $tmp_id_product = $data[$i][2][
'val'];
355 $tmp_qty = $data[$i][3][
'val'];
356 $tmp_batch = $data[$i][4][
'val'];
358 if (!is_numeric($tmp_id_product)) {
359 $result =
fetchref($productstatic, $tmp_id_product);
360 $tmp_id_product = $result;
361 $data[$i][2][
'val'] = $result;
363 if (!($tmp_id_product > 0)) {
365 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Product")),
null,
'errors');
368 if (!is_numeric($tmp_id_sw)) {
369 $result =
fetchref($warehousestatics, $tmp_id_sw);
370 $tmp_id_sw = $result;
371 $data[$i][0][
'val'] = $result;
373 if (!($tmp_id_sw > 0)) {
375 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"WarehouseSource")),
null,
'errors');
378 if (!is_numeric($tmp_id_tw)) {
379 $result =
fetchref($warehousestatict, $tmp_id_tw);
380 $tmp_id_tw = $result;
381 $data[$i][1][
'val'] = $result;
383 if (!($tmp_id_tw > 0)) {
385 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"WarehouseTarget")),
null,
'errors');
388 if ($tmp_id_sw > 0 && $tmp_id_tw == $tmp_id_sw) {
390 $langs->load(
"errors");
391 setEventMessages($langs->trans(
"ErrorWarehouseMustDiffers"),
null,
'errors');
395 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Qty")),
null,
'errors');
400 $producttmp =
new Product($db);
401 $producttmp->fetch($tmp_id_product);
402 if ($producttmp->hasbatch()) {
403 if (empty($tmp_batch)) {
405 $langs->load(
"errors");
406 setEventMessages($langs->trans(
"ErrorTryToMakeMoveOnProductRequiringBatchData", $producttmp->ref),
null,
'errors');
415 foreach ($data as $key => $value) {
416 if (count(array_keys($listofdata)) > 0) {
417 $id = max(array_keys($listofdata)) + 1;
421 $tmp_id_sw = $data[$key][0][
'val'];
422 $tmp_id_tw = $data[$key][1][
'val'];
423 $tmp_id_product = $data[$key][2][
'val'];
424 $tmp_qty = $data[$key][3][
'val'];
425 $tmp_batch = $data[$key][4][
'val'];
426 $listofdata[$key] = array(
'id'=>$key,
'id_sw'=>$tmp_id_sw,
'id_tw'=>$tmp_id_tw,
'id_product'=>$tmp_id_product,
'qty'=>$tmp_qty,
'batch'=>$tmp_batch);
432 $_SESSION[
'massstockmove'] = json_encode($listofdata);
435 if ($action ==
'confirm_deletefile' && $confirm ==
'yes') {
436 $langs->load(
"other");
438 $param =
'&datatoimport='.urlencode($datatoimport).
'&format='.urlencode($format);
439 if ($excludefirstline) {
440 $param .=
'&excludefirstline='.urlencode($excludefirstline);
443 $param .=
'&endatlinenb='.urlencode($endatlinenb);
446 $file = $conf->stock->dir_temp.
'/'.
GETPOST(
'urlfile');
453 Header(
'Location: '.$_SERVER[
"PHP_SELF"]);
467 $productstatic =
new Product($db);
468 $warehousestatics =
new Entrepot($db);
469 $warehousestatict =
new Entrepot($db);
471 $help_url =
'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks|DE:Modul_Bestände';
473 $title = $langs->trans(
'MassMovement');
477 print
load_fiche_titre($langs->trans(
"MassStockTransferShort"),
'',
'stock');
479 $titletoadd = $langs->trans(
"Select");
480 $buttonrecord = $langs->trans(
"RecordMovements");
481 $titletoaddnoent = $langs->transnoentitiesnoconv(
"Select");
482 $buttonrecordnoent = $langs->transnoentitiesnoconv(
"RecordMovements");
483 print
'<span class="opacitymedium">'.$langs->trans(
"SelectProductInAndOutWareHouse", $titletoaddnoent, $buttonrecordnoent).
'</span><br>';
488 print
'<form name="userfile" action="'.$_SERVER[
"PHP_SELF"].
'" enctype="multipart/form-data" METHOD="POST">';
489 print
'<input type="hidden" name="token" value="'.newToken().
'">';
490 print
'<input type="hidden" name="action" value="importCSV">';
491 print
'<span class="opacitymedium">';
492 print $langs->trans(
"or").
' ';
493 $importcsv =
new ImportCsv($db,
'massstocklist');
494 print
$form->textwithpicto($langs->trans(
'SelectAStockMovementFileToImport'), $langs->transnoentitiesnoconv(
"InfoTemplateImport", $importcsv->separator));
498 $maxmin = $maxfilesizearray[
'maxmin'];
500 print
'<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).
'">';
502 print
'<input type="file" name="userfile" size="20" maxlength="80"> ';
503 $out = (empty($conf->global->MAIN_UPLOAD_DOC) ?
' disabled' :
'');
504 print
'<input type="submit" class="button small" value="'.$langs->trans(
"ImportFromCSV").
'"'.$out.
' name="sendit">';
506 if (!empty($conf->global->MAIN_UPLOAD_DOC)) {
507 $max = $conf->global->MAIN_UPLOAD_DOC;
508 $maxphp = @ini_get(
'upload_max_filesize');
509 if (preg_match(
'/k$/i', $maxphp)) {
510 $maxphp = preg_replace(
'/k$/i',
'', $maxphp);
511 $maxphp = $maxphp * 1;
513 if (preg_match(
'/m$/i', $maxphp)) {
514 $maxphp = preg_replace(
'/m$/i',
'', $maxphp);
515 $maxphp = $maxphp * 1024;
517 if (preg_match(
'/g$/i', $maxphp)) {
518 $maxphp = preg_replace(
'/g$/i',
'', $maxphp);
519 $maxphp = $maxphp * 1024 * 1024;
521 if (preg_match(
'/t$/i', $maxphp)) {
522 $maxphp = preg_replace(
'/t$/i',
'', $maxphp);
523 $maxphp = $maxphp * 1024 * 1024 * 1024;
525 $maxphp2 = @ini_get(
'post_max_size');
526 if (preg_match(
'/k$/i', $maxphp2)) {
527 $maxphp2 = preg_replace(
'/k$/i',
'', $maxphp2);
528 $maxphp2 = $maxphp2 * 1;
530 if (preg_match(
'/m$/i', $maxphp2)) {
531 $maxphp2 = preg_replace(
'/m$/i',
'', $maxphp2);
532 $maxphp2 = $maxphp2 * 1024;
534 if (preg_match(
'/g$/i', $maxphp2)) {
535 $maxphp2 = preg_replace(
'/g$/i',
'', $maxphp2);
536 $maxphp2 = $maxphp2 * 1024 * 1024;
538 if (preg_match(
'/t$/i', $maxphp2)) {
539 $maxphp2 = preg_replace(
'/t$/i',
'', $maxphp2);
540 $maxphp2 = $maxphp2 * 1024 * 1024 * 1024;
544 $maxphptoshow = $maxphptoshowparam =
'';
546 $maxmin = min($max, $maxphp);
547 $maxphptoshow = $maxphp;
548 $maxphptoshowparam =
'upload_max_filesize';
551 $maxmin = min($max, $maxphp2);
552 if ($maxphp2 < $maxphp) {
553 $maxphptoshow = $maxphp2;
554 $maxphptoshowparam =
'post_max_size';
558 $langs->load(
'other');
560 $out .=
info_admin($langs->trans(
"ThisLimitIsDefinedInSetup", $max, $maxphptoshow), 1);
562 $out .=
' ('.$langs->trans(
"UploadDisabled").
')';
571 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST" name="formulaire">';
572 print
'<input type="hidden" name="token" value="'.newToken().
'">';
573 print
'<input type="hidden" name="action" value="addline">';
576 print
'<div class="div-table-responsive-no-min">';
577 print
'<table class="liste centpercent">';
581 print
'<tr class="liste_titre">';
582 print
getTitleFieldOfList($langs->trans(
'WarehouseSource'), 0, $_SERVER[
"PHP_SELF"],
'', $param,
'',
'', $sortfield, $sortorder,
'tagtd maxwidthonsmartphone ');
583 print
getTitleFieldOfList($langs->trans(
'WarehouseTarget'), 0, $_SERVER[
"PHP_SELF"],
'', $param,
'',
'', $sortfield, $sortorder,
'tagtd maxwidthonsmartphone ');
584 print
getTitleFieldOfList($langs->trans(
'Product'), 0, $_SERVER[
"PHP_SELF"],
'', $param,
'',
'', $sortfield, $sortorder,
'tagtd maxwidthonsmartphone ');
586 print
getTitleFieldOfList($langs->trans(
'Batch'), 0, $_SERVER[
"PHP_SELF"],
'', $param,
'',
'', $sortfield, $sortorder,
'tagtd maxwidthonsmartphone ');
588 print
getTitleFieldOfList($langs->trans(
'Qty'), 0, $_SERVER[
"PHP_SELF"],
'', $param,
'',
'', $sortfield, $sortorder,
'right tagtd maxwidthonsmartphone ');
592 print
'<tr class="oddeven">';
594 print
'<td class="nowraponall">';
595 print
img_picto($langs->trans(
"WarehouseSource"),
'stock',
'class="paddingright"').$formproduct->selectWarehouses($id_sw,
'id_sw',
'warehouseopen,warehouseinternal', 1, 0, 0,
'', 0, 0, array(),
'minwidth200imp maxwidth200');
598 print
'<td class="nowraponall">';
599 print
img_picto($langs->trans(
"WarehouseTarget"),
'stock',
'class="paddingright"').$formproduct->selectWarehouses($id_tw,
'id_tw',
'warehouseopen,warehouseinternal', 1, 0, 0,
'', 0, 0, array(),
'minwidth200imp maxwidth200');
602 print
'<td class="nowraponall">';
604 if (!empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
607 if ($conf->global->PRODUIT_LIMIT_SIZE <= 0) {
610 $limit = $conf->global->PRODUIT_LIMIT_SIZE;
613 print
img_picto($langs->trans(
"Product"),
'product',
'class="paddingright"');
614 print
$form->select_produits($id_product,
'productid', $filtertype, $limit, 0, -1, 2,
'', 1, array(), 0,
'1', 0,
'minwidth200imp maxwidth300', 1,
'',
null, 1);
618 print
'<td class="nowraponall">';
619 print
img_picto($langs->trans(
"LotSerial"),
'lot',
'class="paddingright"');
620 print
'<input type="text" name="batch" class="flat maxwidth75" value="'.dol_escape_htmltag($batch).
'">';
624 print
'<td class="right"><input type="text" class="flat maxwidth50 right" name="qty" value="'.price2num((
float) $qty,
'MS').
'"></td>';
626 print
'<td class="right"><input type="submit" class="button" name="addline" value="'.dol_escape_htmltag($titletoadd).
'"></td>';
630 foreach ($listofdata as $key => $val) {
631 $productstatic->fetch($val[
'id_product']);
633 $warehousestatics->id = 0;
634 $warehousestatict->id = 0;
635 if ($val[
'id_sw'] > 0) {
636 $warehousestatics->fetch($val[
'id_sw']);
638 if ($val[
'id_tw'] > 0) {
639 $warehousestatict->fetch($val[
'id_tw']);
642 if ($productstatic->id <= 0) {
644 setEventMessages($langs->trans(
"ObjectNotFound", $langs->transnoentitiesnoconv(
"Product")),
null,
'errors');
646 if ($warehousestatics->id < 0) {
648 setEventMessages($langs->trans(
"ObjectNotFound", $langs->transnoentitiesnoconv(
"WarehouseSource")),
null,
'errors');
650 if ($warehousestatict->id <= 0) {
652 setEventMessages($langs->trans(
"ObjectNotFound", $langs->transnoentitiesnoconv(
"WarehouseTarget")),
null,
'errors');
656 print
'<tr class="oddeven">';
658 if ($warehousestatics->id > 0) {
659 print $warehousestatics->getNomUrl(1);
661 print
'<span class="opacitymedium">';
662 print $langs->trans(
"None");
667 print $warehousestatict->getNomUrl(1);
677 print
'<td class="right">'.price2num((
float) $val[
'qty'],
'MS').
'</td>';
678 print
'<td class="right"><a href="'.$_SERVER[
"PHP_SELF"].
'?action=delline&token='.
newToken().
'&idline='.$val[
'id'].
'">'.
img_delete($langs->trans(
"Remove")).
'</a></td>';
691 if (count($listofdata)) {
692 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST" name="formulaire2" class="formconsumeproduce">';
693 print
'<input type="hidden" name="token" value="'.newToken().
'">';
694 print
'<input type="hidden" name="action" value="createmovements">';
698 $labelmovement =
GETPOST(
"label") ?
GETPOST(
'label') : $langs->trans(
"MassStockTransferShort").
' '.
dol_print_date($now,
'%Y-%m-%d %H:%M');
700 print
'<div class="center">';
701 print
'<span class="fieldrequired">'.$langs->trans(
"InventoryCode").
':</span> ';
702 print
'<input type="text" name="codemove" class="maxwidth300" value="'.dol_escape_htmltag($codemove).
'"> ';
703 print
'<span class="clearbothonsmartphone"></span>';
704 print $langs->trans(
"MovementLabel").
': ';
705 print
'<input type="text" name="label" class="minwidth300" value="'.dol_escape_htmltag($labelmovement).
'"><br>';
708 print
'<div class="center"><input type="submit" class="button" name="valid" value="'.dol_escape_htmltag($buttonrecord).
'"></div>';
716 if ($action ==
'delete') {
717 print
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?urlfile='.urlencode(
GETPOST(
'urlfile')).
'&step=3'.$param, $langs->trans(
'DeleteFile'), $langs->trans(
'ConfirmDeleteFile'),
'confirm_deletefile',
'', 0, 1);
734 $length = strlen($needle);
735 return substr($haystack, 0, $length) === $needle;
748 $tmp_ref = str_replace(
'ref:',
'', $tmp_ref);
750 $static_object->fetch(
'', $tmp_ref);
751 return $static_object->id;
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage warehouses.
Class to import CSV files.
Class to manage products or services.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile', $upload_dir='')
Make control on an uploaded file from an GUI page and move it to final destination.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
newToken()
Return the value of token currently saved into session with name 'newtoken'.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='')
Show information for admin users or standard users.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
startsWith($haystack, $needle)
Verify if $haystack startswith $needle.
fetchref($static_object, $tmp_ref)
Fetch object with ref.
getMaxFileSizeArray()
Return the max allowed for file upload.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.