Code: Select all
nuRunPHPHiddenWithParams('ADJP', 'param', {dat: dat, wor: wor, pr: pr, dep: dep, comp: comp, kart: kart, kom: kom, str: str, id: id, coun: coun},0);
PHP('ADJP'):
Code: Select all
nuDebug('#param#');
$param = json_decode(base64_decode('#param#')); // retrieve the parameters
$dep = $param->dep;
$comp = $param->comp;
$dat = $param->dat;
$d = new DateTime($dat);
$dat = $d->format('Y-m-d');
$wor =$param->wor;
$kom =$param->kom;
$str =$param->str;
$pr = $param->pr;
$ka = $param->kart;
$id = $param->id;
$count = $param->coun;
if (empty($dat) or empty($dep) or empty($wor)) {
nuDisplayError('Не заполнены данные !, дата= '.$dat.' отдел='.$dep.' работа= '.$wor);
} else {
$uid=nuID();
$x="INSERT INTO jurprint (jur_pid, jurp_data, jurp_work, jurp_pr, jurp_kart, jurp_dep, jurp_comp, jurp_komm, jurp_itog) VALUES ('$uid', '$dat','$wor', '$pr', '$ka', '$dep', '$comp', '$kom', '$str' )";
nuRunQuery($x);
$x = "UPDATE prints SET total='$str', count='$count',data='$dat' WHERE pr_id='$id';";
nuRunQuery($x);
}