small change

This commit is contained in:
Claudio 2025-01-21 10:23:49 +01:00
parent 251fbfcd33
commit 9b74f92a4c
57 changed files with 331 additions and 286 deletions

View File

@ -26,6 +26,7 @@ if (isset($formnameedit)) {
$UpdateQuery->bindColumn("iddpicategory", "i", "" . ((isset($_POST["categorydpi"])) ? $_POST["categorydpi"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("virusset", "s", "" . ((isset($_POST["virusprotection"])) ? $_POST["virusprotection"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("chemicalsset", "s", "" . ((isset($_POST["chemicalagent"])) ? $_POST["chemicalagent"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("active", "s", "" . ((isset($_POST["active"])) ? $_POST["active"] : "") . "", "WA_DEFAULT");
$UpdateQuery->addFilter("idstandards", "=", "i", "" . ($idstandards) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
@ -152,6 +153,7 @@ $standardlist->execute();
<th>Virus</th>
<th>Chemical</th>
<th>Active</th>
<th><?php echo $action; ?></th>
</tr>
@ -183,7 +185,7 @@ $standardlist->execute();
</div>
<?php } ?>
</td>
<td><?php echo ($standardlist->getColumnVal("active")); ?></td>
<td>
<a href="edit-standard.php?idstandards=<?php echo ($standardlist->getColumnVal("idstandards")); ?>" class="mr-2"><i class="fas fa-edit text-info font-16"></i></a>
<a href="edit-protcategory.php?idstandards=<?php echo ($standardlist->getColumnVal("idstandards")); ?>">PC</a>

View File

@ -243,51 +243,55 @@ $chemicalagentlist->execute();
<div class="progress-bar" role="progressbar" style="width: 95%;" aria-valuenow="95" aria-valuemin="0" aria-valuemax="100">95%</div>
</div>
<!-- send to client to sign -->
<?php if ((Auth::user()->hasRole('Admin')) || (Auth::user()->hasRole('CustomerService')) || (Auth::user()->hasRole('Superuser'))) : ?>
<div class="card">
<div class="card-body">
<div class="card">
<div class="card-body">
<?php if ((Auth::user()->hasRole('Admin')) || (Auth::user()->hasRole('CustomerService')) || (Auth::user()->hasRole('Superuser'))) : ?>
<h4 class="mt-0 header-title">Invia a Cliente per Firma</h4>
<form action="previewtrf.php" method="post" name="myForm2" id="myForm2" class="form-parsley">
<?php endif; ?>
<?php if ((Auth::user()->hasRole('User'))) : ?>
<h4 class="mt-0 header-title"><?php echo $respsign; ?></h4>
<?php endif; ?>
<form action="previewtrf.php" method="post" name="myForm2" id="myForm2" class="form-parsley">
<div class="form-group row">
<div class="form-group row">
<div class="col-sm-2">
<input hidden id="idtrf" name="idtrf" value="<?php echo $idtrf; ?>">
<input hidden id="formdeclaration" name="formdeclaration" value="OK">
<input hidden id="sndrpt" name="sndrpt" value="<?php echo $sndrpt; ?>">
</div>
<div class="col-sm-2">
<input hidden id="idtrf" name="idtrf" value="<?php echo $idtrf; ?>">
<input hidden id="formdeclaration" name="formdeclaration" value="OK">
<input hidden id="sndrpt" name="sndrpt" value="<?php echo $sndrpt; ?>">
</div>
<br>
</div>
<!-- <button class="btn btn-gradient-success waves-effect waves-light" type="submit">Conferma</button> -->
<div id="cont_wait" style="display:none;">
<br>
<div class="alert icon-custom-alert alert-outline-warning alert-danger-shadow" role="alert">
<!-- <i class="mdi mdi-alert-outline alert-icon"></i> -->
<div class="alert-text">
<strong>Attenzione:</strong> Inserimento Application Form in corso, Attendi!
</div>
<!-- <button class="btn btn-gradient-success waves-effect waves-light" type="submit">Conferma</button> -->
<div id="cont_wait" style="display:none;">
<div class="alert icon-custom-alert alert-outline-warning alert-danger-shadow" role="alert">
<!-- <i class="mdi mdi-alert-outline alert-icon"></i> -->
<div class="alert-text">
<strong>Attenzione:</strong> Inserimento Application Form in corso, Attendi!
</div>
</div>
</div>
<button class="btn btn-gradient-success waves-effect waves-light" type="submit" id="btnConfirm3"><?php echo $modtitle; ?></button><!-- o <a href="sendtrftosign.php"><button class="btn btn-gradient-warning waves-effect waves-light" type="button" id="btnConfirm"><?php echo $sendtosign; ?></button></a> -->
</form>
<button class="btn btn-gradient-success waves-effect waves-light" type="submit" id="btnConfirm3"><?php echo $modtitle; ?></button><!-- o <a href="sendtrftosign.php"><button class="btn btn-gradient-warning waves-effect waves-light" type="button" id="btnConfirm"><?php echo $sendtosign; ?></button></a> -->
</form>
</div>
</div>
</div>
<?php endif; ?>
<!-- card for optional TRF -->
<?php if ((Auth::user()->hasRole('Admin')) || (Auth::user()->hasRole('User')) || (Auth::user()->hasRole('Superuser'))) : ?>

View File

@ -1,71 +1,70 @@
<?php
include('include/headscript.php'); ?>
<?php
include('include/headscript.php'); ?>
<?php
// pickup the get variable
if (isset($_GET["idstandards"])) {
$idstandards=$_GET["idstandards"];
}
// pickup the get variable
if (isset($_GET["idstandards"])) {
$idstandards = $_GET["idstandards"];
}
?>
<?php
$standarddetail = new WA_MySQLi_RS("standarddetail",$cmctrfdb,0);
$standarddetail = new WA_MySQLi_RS("standarddetail", $cmctrfdb, 0);
$standarddetail->setQuery("SELECT * FROM standards WHERE standards.idstandards='$idstandards' ORDER BY standards.idarticletype, standards.standardcode");
$standarddetail->execute();
?>
<?php
$articletypelist = new WA_MySQLi_RS("articletypelist",$cmctrfdb,0);
$articletypelist = new WA_MySQLi_RS("articletypelist", $cmctrfdb, 0);
$articletypelist->setQuery("SELECT * FROM article_type ORDER BY article_type.name_articletype");
$articletypelist->execute();
?>
<?php
$articlecharacteristiclist = new WA_MySQLi_RS("articlecharacteristiclist",$cmctrfdb,0);
$articlecharacteristiclist = new WA_MySQLi_RS("articlecharacteristiclist", $cmctrfdb, 0);
$articlecharacteristiclist->setQuery("SELECT * FROM article_characteristic ORDER BY article_characteristic.idarticletype, article_characteristic.name_articlecharacteristic");
$articlecharacteristiclist->execute();
?>
<?php
$categorydpilist = new WA_MySQLi_RS("categorydpilist",$cmctrfdb,0);
$categorydpilist = new WA_MySQLi_RS("categorydpilist", $cmctrfdb, 0);
$categorydpilist->setQuery("SELECT * FROM dpicategory ORDER BY dpicategory.value_dpicategory");
$categorydpilist->execute();?>
$categorydpilist->execute(); ?>
<?php
$idarticletypen=$standarddetail->getColumnVal("idarticletype");
$articletypesel = new WA_MySQLi_RS("articletypesel",$cmctrfdb,1);
$idarticletypen = $standarddetail->getColumnVal("idarticletype");
$articletypesel = new WA_MySQLi_RS("articletypesel", $cmctrfdb, 1);
$articletypesel->setQuery("SELECT * FROM article_type WHERE article_type.idarticletype='$idarticletypen'");
$articletypesel->execute();?>
$articletypesel->execute(); ?>
<?php
$idarticlecharacteristicn=$standarddetail->getColumnVal("idarticlecharacteristic");
$artcharactcheck = new WA_MySQLi_RS("artcharactcheck",$cmctrfdb,1);
$idarticlecharacteristicn = $standarddetail->getColumnVal("idarticlecharacteristic");
$artcharactcheck = new WA_MySQLi_RS("artcharactcheck", $cmctrfdb, 1);
$artcharactcheck->setQuery("SELECT * FROM article_characteristic WHERE article_characteristic.idarticlecharacteristic='$idarticlecharacteristicn'");
$artcharactcheck->execute();?>
$artcharactcheck->execute(); ?>
<?php
$iddpicategoryn=$standarddetail->getColumnVal("iddpicategory");
$dpicategorycheck = new WA_MySQLi_RS("dpicategorycheck",$cmctrfdb,1);
$iddpicategoryn = $standarddetail->getColumnVal("iddpicategory");
$dpicategorycheck = new WA_MySQLi_RS("dpicategorycheck", $cmctrfdb, 1);
$dpicategorycheck->setQuery("SELECT * FROM dpicategory WHERE dpicategory.iddpicategory='$iddpicategoryn'");
$dpicategorycheck->execute();
?>
<?php
if (isset($formnameedit)) {
echo "Ciao";
if (isset($formnameedit)) {
echo "Ciao";
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "standards";
$UpdateQuery->bindColumn("fmidstandards", "i", "".((isset($_POST["fmcode"]))?$_POST["fmcode"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("standardname", "s", "".((isset($_POST["itastdname"]))?$_POST["itastdname"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("standardname_eng", "s", "".((isset($_POST["engstdname"]))?$_POST["engstdname"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("standardcode", "s", "".((isset($_POST["standardcode"]))?$_POST["standardcode"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("idarticletype", "i", "".((isset($_POST["idarticletype"]))?$_POST["idarticletype"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("idarticlecharacteristic", "i", "".((isset($_POST["articlecharact"]))?$_POST["articlecharact"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("iddpicategory", "i", "".((isset($_POST["categorydpi"]))?$_POST["categorydpi"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("virusset", "s", "".((isset($_POST["virusprotection"]))?$_POST["virusprotection"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("chemicalsset", "s", "".((isset($_POST["chemicalagent"]))?$_POST["chemicalagent"]:"") ."", "WA_DEFAULT");
$UpdateQuery->addFilter("idstandards", "=", "i", "".($idstandards) ."");
$UpdateQuery->bindColumn("fmidstandards", "i", "" . ((isset($_POST["fmcode"])) ? $_POST["fmcode"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("standardname", "s", "" . ((isset($_POST["itastdname"])) ? $_POST["itastdname"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("standardname_eng", "s", "" . ((isset($_POST["engstdname"])) ? $_POST["engstdname"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("standardcode", "s", "" . ((isset($_POST["standardcode"])) ? $_POST["standardcode"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("idarticletype", "i", "" . ((isset($_POST["idarticletype"])) ? $_POST["idarticletype"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("idarticlecharacteristic", "i", "" . ((isset($_POST["articlecharact"])) ? $_POST["articlecharact"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("iddpicategory", "i", "" . ((isset($_POST["categorydpi"])) ? $_POST["categorydpi"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("virusset", "s", "" . ((isset($_POST["virusprotection"])) ? $_POST["virusprotection"] : "") . "", "WA_DEFAULT");
$UpdateQuery->bindColumn("chemicalsset", "s", "" . ((isset($_POST["chemicalagent"])) ? $_POST["chemicalagent"] : "") . "", "WA_DEFAULT");
$UpdateQuery->addFilter("idstandards", "=", "i", "" . ($idstandards) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
$UpdateQuery->redirect($UpdateGoTo);
}
?>
@ -75,223 +74,257 @@ if (isset($formnameedit)) {
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TRF CIMAC </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="CIMAC TRF Portal" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8" />
<title>TRF CIMAC </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="CIMAC TRF Portal" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!-- submit form with button -->
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
<!-- submit form with button -->
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
</head>
<body>
<body>
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Left Sidenav -->
<?php include('include/leftsidenav.php'); ?>
<!-- end left-sidenav-->
<!-- Left Sidenav -->
<?php include('include/leftsidenav.php'); ?>
<!-- end left-sidenav-->
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">TRF</a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h4 class="page-title"><?php echo $titlewb; ?></h4>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<!-- card for additional info gloves -->
<!--end card-body-->
<!-- card for show requirements -->
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title">Gestione Standards</h4>
<p class="text-muted mb-3">Da questa pagina puoi gestire gli standards e tutti i dati correlati</p>
<form class="was-validated" action="admin-standards.php" method="post" name="myForm">
<div class="form-group row">
<label for="standardcode" class="col-sm-2 col-form-label text-right">Standard Code</label>
<div class="col-sm-10">
<input class="form-control" type="text" value="<?php echo($standarddetail->getColumnVal("standardcode")); ?>" id="standardcode" name="standardcode">
</div>
</div>
<div class="form-group row">
<label for="itastdname" class="col-sm-2 col-form-label text-right">Nome STD Italiano</label>
<div class="col-sm-10">
<input class="form-control" type="text" value="<?php echo($standarddetail->getColumnVal("standardname")); ?>" id="itastdname" name="itastdname">
</div>
</div>
<div class="form-group row">
<label for="engstdname" class="col-sm-2 col-form-label text-right">Nome STD Inglese</label>
<div class="col-sm-10">
<input class="form-control" type="text" value="<?php echo($standarddetail->getColumnVal("standardname_eng")); ?>" id="engstdname" name="engstdname">
</div>
</div>
<div class="form-group row">
<label for="fmcode" class="col-sm-2 col-form-label text-right">Codice FM</label>
<div class="col-sm-10">
<input class="form-control" type="text" value="<?php echo($standarddetail->getColumnVal("fmidstandards")); ?>" id="fmcode" name="fmcode">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">Tipologia Articolo</label>
<div class="col-sm-10">
<select class="form-control" name="idarticletype" id="idarticletype">
<option value="" <?php if (!(strcmp("", ($articletypesel->getColumnVal("idarticletype"))))) {echo "selected=\"selected\"";} ?>>Seleziona</option>
<?php
while(!$articletypelist->atEnd()) { //dyn select
?>
<option value="<?php echo($articletypelist->getColumnVal("idarticletype")); ?>"<?php if (!(strcmp($articletypelist->getColumnVal("idarticletype"), ($articletypesel->getColumnVal("idarticletype"))))) {echo "selected=\"selected\"";} ?>><?php echo($articletypelist->getColumnVal("name_articletype")); ?></option>
<?php
$articletypelist->moveNext();
} //dyn select
$articletypelist->moveFirst();
?>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">Caratteristiche Articolo</label>
<div class="col-sm-10">
<select class="form-control" id="articlecharact" name="articlecharact">
<option value="" <?php if (!(strcmp("", ($standarddetail->getColumnVal("idarticlecharacteristic"))))) {echo "selected=\"selected\"";} ?>>Seleziona</option>
<?php
while(!$articlecharacteristiclist->atEnd()) { //dyn select
?>
<option value="<?php echo($articlecharacteristiclist->getColumnVal("idarticlecharacteristic")); ?>"<?php if (!(strcmp($articlecharacteristiclist->getColumnVal("idarticlecharacteristic"), ($standarddetail->getColumnVal("idarticlecharacteristic"))))) {echo "selected=\"selected\"";} ?>><?php echo($articlecharacteristiclist->getColumnVal("name_articlecharacteristic")); ?></option>
<?php
$articlecharacteristiclist->moveNext();
} //dyn select
$articlecharacteristiclist->moveFirst();
?>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">Categoria DPI</label>
<div class="col-sm-10">
<select class="form-control" id="categorydpi" name="categorydpi">
<option value="" <?php if (!(strcmp("", ($standarddetail->getColumnVal("iddpicategory"))))) {echo "selected=\"selected\"";} ?>>Seleziona</option>
<?php
while(!$categorydpilist->atEnd()) { //dyn select
?>
<option value="<?php echo($categorydpilist->getColumnVal("iddpicategory")); ?>"<?php if (!(strcmp($categorydpilist->getColumnVal("iddpicategory"), ($standarddetail->getColumnVal("iddpicategory"))))) {echo "selected=\"selected\"";} ?>><?php echo($categorydpilist->getColumnVal("value_dpicategory")); ?></option>
<?php
$categorydpilist->moveNext();
} //dyn select
$categorydpilist->moveFirst();
?>
</select>
</div>
</div>
<div class="custom-control custom-checkbox">
<input <?php if (!(strcmp(($standarddetail->getColumnVal("virusset")),"Y"))) {echo "checked=\"checked\"";} ?> type="checkbox" class="custom-control-input" id="virusprotection" name="virusprotection" value="Y" data-parsley-multiple="groups" data-parsley-mincheck="2">
<label class="custom-control-label" for="virusprotection">Protezione Virus</label>
</div>
<br>
<div class="custom-control custom-checkbox">
<input <?php if (!(strcmp(($standarddetail->getColumnVal("chemicalsset")),"Y"))) {echo "checked=\"checked\"";} ?> type="checkbox" class="custom-control-input" id="chemicalagent" name="chemicalagent" value="Y" data-parsley-multiple="groups" data-parsley-mincheck="2">
<label class="custom-control-label" for="chemicalagent">Agenti Chimici</label>
</div>
<br>
<input type="hidden" name="idstandards" id="idstandards" value="<?php echo $idstandards; ?>">
<input type="hidden" name="formnameedit" id="formnameedit" value="stdeditform">
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="Aggiorna"><br>
</form>
</div><!--end card-body-->
</div><!--end card-->
</div><!--end col-->
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">TRF</a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<!-- end page title end breadcrumb -->
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
<h4 class="page-title"><?php echo $titlewb; ?></h4>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<!-- end page-wrapper -->
<div class="row">
<div class="col-sm-12">
<!-- card for additional info gloves -->
<!--end card-body-->
<!-- card for show requirements -->
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title">Gestione Standards</h4>
<p class="text-muted mb-3">Da questa pagina puoi gestire gli standards e tutti i dati correlati</p>
<form class="was-validated" action="admin-standards.php" method="post" name="myForm">
<div class="form-group row">
<label for="standardcode" class="col-sm-2 col-form-label text-right">Standard Code</label>
<div class="col-sm-10">
<input class="form-control" type="text" value="<?php echo ($standarddetail->getColumnVal("standardcode")); ?>" id="standardcode" name="standardcode">
</div>
</div>
<div class="form-group row">
<label for="itastdname" class="col-sm-2 col-form-label text-right">Nome STD Italiano</label>
<div class="col-sm-10">
<input class="form-control" type="text" value="<?php echo ($standarddetail->getColumnVal("standardname")); ?>" id="itastdname" name="itastdname">
</div>
</div>
<div class="form-group row">
<label for="engstdname" class="col-sm-2 col-form-label text-right">Nome STD Inglese</label>
<div class="col-sm-10">
<input class="form-control" type="text" value="<?php echo ($standarddetail->getColumnVal("standardname_eng")); ?>" id="engstdname" name="engstdname">
</div>
</div>
<div class="form-group row">
<label for="fmcode" class="col-sm-2 col-form-label text-right">Codice FM</label>
<div class="col-sm-10">
<input class="form-control" type="text" value="<?php echo ($standarddetail->getColumnVal("fmidstandards")); ?>" id="fmcode" name="fmcode">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">Tipologia Articolo</label>
<div class="col-sm-10">
<select class="form-control" name="idarticletype" id="idarticletype">
<option value="" <?php if (!(strcmp("", ($articletypesel->getColumnVal("idarticletype"))))) {
echo "selected=\"selected\"";
} ?>>Seleziona</option>
<?php
while (!$articletypelist->atEnd()) { //dyn select
?>
<option value="<?php echo ($articletypelist->getColumnVal("idarticletype")); ?>" <?php if (!(strcmp($articletypelist->getColumnVal("idarticletype"), ($articletypesel->getColumnVal("idarticletype"))))) {
echo "selected=\"selected\"";
} ?>><?php echo ($articletypelist->getColumnVal("name_articletype")); ?></option>
<?php
$articletypelist->moveNext();
} //dyn select
$articletypelist->moveFirst();
?>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">Caratteristiche Articolo</label>
<div class="col-sm-10">
<select class="form-control" id="articlecharact" name="articlecharact">
<option value="" <?php if (!(strcmp("", ($standarddetail->getColumnVal("idarticlecharacteristic"))))) {
echo "selected=\"selected\"";
} ?>>Seleziona</option>
<?php
while (!$articlecharacteristiclist->atEnd()) { //dyn select
?>
<option value="<?php echo ($articlecharacteristiclist->getColumnVal("idarticlecharacteristic")); ?>" <?php if (!(strcmp($articlecharacteristiclist->getColumnVal("idarticlecharacteristic"), ($standarddetail->getColumnVal("idarticlecharacteristic"))))) {
echo "selected=\"selected\"";
} ?>><?php echo ($articlecharacteristiclist->getColumnVal("name_articlecharacteristic")); ?></option>
<?php
$articlecharacteristiclist->moveNext();
} //dyn select
$articlecharacteristiclist->moveFirst();
?>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">Categoria DPI</label>
<div class="col-sm-10">
<select class="form-control" id="categorydpi" name="categorydpi">
<option value="" <?php if (!(strcmp("", ($standarddetail->getColumnVal("iddpicategory"))))) {
echo "selected=\"selected\"";
} ?>>Seleziona</option>
<?php
while (!$categorydpilist->atEnd()) { //dyn select
?>
<option value="<?php echo ($categorydpilist->getColumnVal("iddpicategory")); ?>" <?php if (!(strcmp($categorydpilist->getColumnVal("iddpicategory"), ($standarddetail->getColumnVal("iddpicategory"))))) {
echo "selected=\"selected\"";
} ?>><?php echo ($categorydpilist->getColumnVal("value_dpicategory")); ?></option>
<?php
$categorydpilist->moveNext();
} //dyn select
$categorydpilist->moveFirst();
?>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label text-right">Active</label>
<div class="col-sm-10">
<select class="form-control" id="active" name="active">
<option value="" <?php if (!(strcmp("", ($standarddetail->getColumnVal("active"))))) {
echo "selected=\"selected\"";
} ?>>Seleziona</option>
<option value="Y" <?php if (!(strcmp("Y", ($standarddetail->getColumnVal("active"))))) {
echo "selected=\"selected\"";
} ?>>Y</option>
<option value="N" <?php if (!(strcmp("N", ($standarddetail->getColumnVal("active"))))) {
echo "selected=\"selected\"";
} ?>>N</option>
</select>
</div>
</div>
<div class="custom-control custom-checkbox">
<input <?php if (!(strcmp(($standarddetail->getColumnVal("virusset")), "Y"))) {
echo "checked=\"checked\"";
} ?> type="checkbox" class="custom-control-input" id="virusprotection" name="virusprotection" value="Y" data-parsley-multiple="groups" data-parsley-mincheck="2">
<label class="custom-control-label" for="virusprotection">Protezione Virus</label>
</div>
<br>
<div class="custom-control custom-checkbox">
<input <?php if (!(strcmp(($standarddetail->getColumnVal("chemicalsset")), "Y"))) {
echo "checked=\"checked\"";
} ?> type="checkbox" class="custom-control-input" id="chemicalagent" name="chemicalagent" value="Y" data-parsley-multiple="groups" data-parsley-mincheck="2">
<label class="custom-control-label" for="chemicalagent">Agenti Chimici</label>
</div>
<br>
<input type="hidden" name="idstandards" id="idstandards" value="<?php echo $idstandards; ?>">
<input type="hidden" name="formnameedit" id="formnameedit" value="stdeditform">
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="Aggiorna"><br>
</form>
</div><!--end card-body-->
</div><!--end card-->
<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/metismenu.min.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/feather.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
</div><!--end col-->
</div>
<!-- end page title end breadcrumb -->
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
<script src="assets/pages/jquery.form-wizard.init.js"></script>
<!-- App js -->
<script src="assets/js/app.js"></script>
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- end page-wrapper -->
</body>
<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/metismenu.min.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/feather.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
<script src="assets/pages/jquery.form-wizard.init.js"></script>
<!-- App js -->
<script src="assets/js/app.js"></script>
</body>
</html>

View File

@ -68,7 +68,7 @@
<a class="dropdown-item" href="profile"><i class="ti-user text-muted mr-2"></i> <?php echo $profile; ?></a>
<a class="dropdown-item" href="companyprofile.php"><i class="ti-wallet text-muted mr-2"></i> <?php echo $mycompany; ?></a>
<a class="dropdown-item" href="signaturetok.php"><i class="ti-wallet text-muted mr-2"></i> <?php echo $signaturetokentitle; ?></a>
<a class="dropdown-item" href="newusercolleague2.php"><i class="ti-wallet text-muted mr-2"></i> Aggiungi Utente</a>
<a class="dropdown-item" href="newusercolleague2.php"><i class="ti-wallet text-muted mr-2"></i> <?php echo $adduserundersamecompany; ?></a>
<a class="dropdown-item" href="#"><i class="ti-settings text-muted mr-2"></i> <?php echo $settings; ?></a>
<div class="dropdown-divider mb-0"></div>
<a class="dropdown-item" href="logout"><i class="ti-power-off text-muted mr-2"></i> <?php echo $logoutst; ?></a>

View File

@ -346,3 +346,5 @@ $uploadCompanyLogoTitle = "Upload Company Logo";
$selectImageToUploadTitle = "Select the image to upload (only JPG, JPEG, PNG):";
$uploadButtonTitle = "Upload";
$companyLogoAltTitle = "Company Logo";
$respsign = "Send to Sign to another colleagues of the same company";
$adduserundersamecompany = "Add User";

View File

@ -350,3 +350,5 @@ $uploadCompanyLogoTitle = "Carica Logo Aziendale";
$selectImageToUploadTitle = "Seleziona l'immagine da caricare (solo JPG, JPEG, PNG):";
$uploadButtonTitle = "Carica";
$companyLogoAltTitle = "Logo Aziendale";
$respsign = "Invia a collega della stessa azienda per Firma";
$adduserundersamecompany = "Aggiungi utente";

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -30,7 +30,10 @@ $pdf->Cell(40, 6, $addresspdf, 1, 0, 'L');
$contactsaddress = html_entity_decode($contactsinfoData['address']);
$contactsaddress = iconv('UTF-8', 'windows-1252', $contactsaddress);
$contactsaddress = mb_convert_encoding($contactsaddress, 'ISO-8859-1', 'UTF-8'); // Conversione diretta
$contactsaddress = iconv('ISO-8859-1', 'windows-1252//TRANSLIT', $contactsaddress);
$pdf->Cell(150, 6, $contactsaddress, 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $citytitleb, 1, 0, 'L');

View File

@ -19,7 +19,8 @@ $pdf->SetFillColor(232, 242, 255);
$pdf->Cell(150, 6, $companyname, 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $addresspdf, 1, 0, 'L');
$pdf->Cell(150, 6, $contactsinfoData['address'], 1, 0, 'L', TRUE);
$pdf->Cell(150, 6, iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $contactsinfoData['address']), 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $citytitleb, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['city'], 1, 0, 'L', TRUE);

View File

@ -4,9 +4,15 @@ if (Auth::user()->hasRole('User')) :
$nameuser = $_SESSION["nameuser"];
//$pdf->Cell(120,6,'Intendo sottoporre questo modello a sorveglianza (presso CIMAC)',1,0,'C');
//$pdf->Cell(70,6,$trfData['surveillanceselectoption'],1,0,'C',TRUE);
if (!mb_check_encoding($statement, 'UTF-8')) {
$statement = utf8_encode($statement); // Forza la codifica in UTF-8
}
$statement = html_entity_decode($statement);
$statement = iconv('UTF-8', 'windows-1252', $statement);
$statement = mb_convert_encoding($statement, 'windows-1252', 'UTF-8');
//$statement = iconv('UTF-8', 'iso-8859-1', $statement);
$addstatement = html_entity_decode($addstatement);
$addstatement = iconv('UTF-8', 'windows-1252', $addstatement);
//$addstatement = iconv('UTF-8', 'iso-8859-1', $addstatement);

2
public/phpinfo.php Normal file
View File

@ -0,0 +1,2 @@
<?php
phpinfo();

View File

@ -259,6 +259,7 @@ if ($tokenid != $tokensignatureon) {
require 'phpmailer/src/PHPMailer.php';
require 'phpmailer/src/SMTP.php';
//mail to client
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
@ -283,14 +284,17 @@ if ($tokenid != $tokensignatureon) {
$mail->Subject = $appformn . 'r' . $revnumb;
$mail->Body = $htmlContent;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
error_log("Attempting to send email to: $emailuser with idtrf: $idtrf");
if ($adminconfirm == 'N') {
$mail->send();
error_log("Email sent successfully to: $emailuser with idtrf: $idtrf");
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent CL. Mailer Error: {$mail->ErrorInfo}";
}
// mail to CS
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP

View File

@ -552,32 +552,18 @@ include('include/trfqueryscript.php'); ?>
if (!empty($rows)) {
foreach ($rows as $row) {
// Controllo se l'idarticletype è uguale a 4
if ($row['idarticletype'] == 4) {
// Mostra l'opzione solo se l'utente è admin o superuser
if (Auth::user()->hasRole('Admin') || Auth::user()->hasRole('Superuser')) {
// Mostra normalmente gli altri articletype
?>
<option value="<?php echo $row['idarticletype']; ?>" <?php if (!(strcmp($row['idarticletype'], ($trfnumberfinal->getColumnVal("idarticletype"))))) {
echo "selected=\"selected\"";
} ?>>
<?php
echo ($_SESSION['langselect'] == 'it') ? $row['name_articletype'] : $row['name_articletypeeng'];
?>
</option>
<option value="<?php echo $row['idarticletype']; ?>" <?php if (!(strcmp($row['idarticletype'], ($trfnumberfinal->getColumnVal("idarticletype"))))) {
echo "selected=\"selected\"";
} ?>>
<?php
}
} else {
// Mostra normalmente gli altri articletype
echo ($_SESSION['langselect'] == 'it') ? $row['name_articletype'] : $row['name_articletypeeng'];
?>
<option value="<?php echo $row['idarticletype']; ?>" <?php if (!(strcmp($row['idarticletype'], ($trfnumberfinal->getColumnVal("idarticletype"))))) {
echo "selected=\"selected\"";
} ?>>
<?php
echo ($_SESSION['langselect'] == 'it') ? $row['name_articletype'] : $row['name_articletypeeng'];
?>
</option>
</option>
<?php
}
}
}
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB