Addomg and update files inside importify folder
This commit is contained in:
parent
fbc992bd65
commit
95d2495137
@ -20,7 +20,48 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/boxicons@2.0.7/css/boxicons.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.css">
|
||||
<style>
|
||||
.table-custom tr {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.table-custom td,
|
||||
.table-custom th {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.table-custom .btn {
|
||||
padding: 2px 15px;
|
||||
line-height: 1.7;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* Questo allinea verticalmente gli elementi nella riga */
|
||||
gap: 10px;
|
||||
/* Questo crea una piccola distanza tra gli elementi nella riga */
|
||||
}
|
||||
|
||||
.table-custom .form-control,
|
||||
.table-custom .form-select {
|
||||
height: 25px;
|
||||
/* Puoi modificare questo valore per adattarlo al tuo design */
|
||||
padding: 2px 6px;
|
||||
/* riduce la dimensione del padding */
|
||||
font-size: 14px;
|
||||
/* riduce la dimensione del font */
|
||||
}
|
||||
|
||||
.table-custom .form-control-sm.analysis-input {
|
||||
height: 25px;
|
||||
/* Questo modifica la dimensione degli input con classe 'form-control-sm' e 'analysis-input' */
|
||||
padding: 2px 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
@ -70,9 +111,64 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="header-title pb-3 mt-0">Importify: <?php echo $dashboard; ?></h5>
|
||||
<a class="btn btn-primary" href="insert-importifytemplate.php" role="button">Insert new template</a>
|
||||
<a class="btn btn-success" href="rsl-category.php" role="button">Import File</a>
|
||||
<a href="component.php"><button type="button" class="btn btn-info w-md waves-effect waves-light">Hystory Import</button></a>
|
||||
<a href="standards.php"><button type="button" class="btn btn-danger w-md waves-effect waves-light">Dasboard</button></a>
|
||||
|
||||
|
||||
<br><br>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm sm-0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th><strong>Template Name</strong></th>
|
||||
<th><strong>Description</strong></th>
|
||||
<th><strong>File Source</strong></th>
|
||||
<th><strong>Lab Name</strong></th>
|
||||
<th><strong>Action</strong></th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $templateimportify = new WA_MySQLi_RS("rsl", $repnew, 0);
|
||||
$templateimportify->setQuery("SELECT * FROM template_importify");
|
||||
$templateimportify->execute();
|
||||
|
||||
$wa_startindex = 0;
|
||||
while (!$templateimportify->atEnd()) {
|
||||
$wa_startindex = $templateimportify->Index;
|
||||
?> <tr>
|
||||
<td><?php echo ($templateimportify->getColumnVal("templatename")); ?></td>
|
||||
<td><?php echo ($templateimportify->getColumnVal("templatedescription")); ?></td>
|
||||
<td><?php echo ($templateimportify->getColumnVal("fileextension")); ?></td>
|
||||
<td><?php echo ($templateimportify->getColumnVal("labname")); ?></td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<a href="synoptic-table.php?idrsl=<?php echo ($templateimportify->getColumnVal("idimporttemplates")); ?>"><button type="button" class="btn btn-success waves-effect waves-light" data-toggle="tooltip" title="Synoptic Table"><i class="bx bx-table font-size-16 align-middle"></i></button></a>
|
||||
<a class="btn btn-success" href="material-rsl.php?id=<?php echo ($templateimportify->getColumnVal("idimporttemplates")); ?>" role="button" data-toggle="tooltip" title="Go"><i class="fas fa-angle-double-right font-size-16 align-middle"></i></a>
|
||||
|
||||
<a class="btn btn-danger canc-btn" href="cancel-rsl.php?id=<?php echo ($templateimportify->getColumnVal("idimporttemplates")); ?>" role="button" data-toggle="tooltip" title="Delete"><i class="fas fa-trash font-size-16 align-middle"></i></a>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php $templateimportify->moveNext();
|
||||
}
|
||||
$templateimportify->moveFirst(); //return RS to first record
|
||||
unset($wa_startindex);
|
||||
unset($wa_repeatcount);
|
||||
|
||||
?></tbody>
|
||||
</table>
|
||||
</div><!--end table-responsive-->
|
||||
|
||||
</div>
|
||||
|
||||
35
public/userarea/importify/cancel-importifytemplate.php
Normal file
35
public/userarea/importify/cancel-importifytemplate.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php include('../include/headscript.php'); ?>
|
||||
<?php
|
||||
$conn = new mysqli($servername, $username, $password, $database);
|
||||
// Verifica se l'ID è presente nell'URL
|
||||
if (isset($_GET['idimporttemplates'])) {
|
||||
$id = $_GET['idimporttemplates'];
|
||||
|
||||
// Prepara la query di cancellazione
|
||||
$query = "DELETE FROM template_importify WHERE idimporttemplates = ?";
|
||||
|
||||
// Prepara la dichiarazione
|
||||
if ($stmt = $conn->prepare($query)) {
|
||||
// Lega i parametri
|
||||
$stmt->bind_param("i", $id);
|
||||
|
||||
// Esegui la query
|
||||
if ($stmt->execute()) {
|
||||
// Reindirizza alla dashboard
|
||||
header("Location: importifydashboard.php");
|
||||
exit();
|
||||
} else {
|
||||
echo "Errore nell'esecuzione della query.";
|
||||
}
|
||||
} else {
|
||||
echo "Errore nella preparazione della query.";
|
||||
}
|
||||
|
||||
// Chiudi la dichiarazione
|
||||
$stmt->close();
|
||||
} else {
|
||||
echo "ID non specificato.";
|
||||
}
|
||||
|
||||
// Chiudi la connessione
|
||||
$conn->close();
|
||||
258
public/userarea/importify/importifydashboard.php
Normal file
258
public/userarea/importify/importifydashboard.php
Normal file
@ -0,0 +1,258 @@
|
||||
<?php include('../include/headscript.php'); ?>
|
||||
<?php include("../class/company.php");
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
|
||||
<?php include('../include/seo.php'); ?>
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
||||
<link rel="shortcut icon" href="../assets/images/favicon.ico">
|
||||
|
||||
<link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="../assets/css/icons.css" rel="stylesheet" type="text/css">
|
||||
<link href="../assets/css/style.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/boxicons@2.0.7/css/boxicons.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.css">
|
||||
<style>
|
||||
.table-custom tr {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.table-custom td,
|
||||
.table-custom th {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.table-custom .btn {
|
||||
padding: 2px 15px;
|
||||
line-height: 1.7;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* Questo allinea verticalmente gli elementi nella riga */
|
||||
gap: 10px;
|
||||
/* Questo crea una piccola distanza tra gli elementi nella riga */
|
||||
}
|
||||
|
||||
.table-custom .form-control,
|
||||
.table-custom .form-select {
|
||||
height: 25px;
|
||||
/* Puoi modificare questo valore per adattarlo al tuo design */
|
||||
padding: 2px 6px;
|
||||
/* riduce la dimensione del padding */
|
||||
font-size: 14px;
|
||||
/* riduce la dimensione del font */
|
||||
}
|
||||
|
||||
.table-custom .form-control-sm.analysis-input {
|
||||
height: 25px;
|
||||
/* Questo modifica la dimensione degli input con classe 'form-control-sm' e 'analysis-input' */
|
||||
padding: 2px 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body class="fixed-left">
|
||||
|
||||
<!-- Loader -->
|
||||
<div id="preloader">
|
||||
<div id="status">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Begin page -->
|
||||
<div id="wrapper">
|
||||
|
||||
<?php include('../include/navigationbar.php'); ?>
|
||||
|
||||
<!-- Start right Content here -->
|
||||
|
||||
<div class="content-page">
|
||||
<!-- Start content -->
|
||||
<div class="content">
|
||||
|
||||
<?php include('../include/topbar.php'); ?>
|
||||
|
||||
<div class="page-content-wrapper ">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="page-title-box">
|
||||
<div class="btn-group float-right">
|
||||
<ol class="breadcrumb hide-phone p-0 m-0">
|
||||
<li class="breadcrumb-item"><a href="#">Reportify</a></li>
|
||||
<li class="breadcrumb-item active">Importify</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Importify</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title end breadcrumb -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="header-title pb-3 mt-0">Importify: <?php echo $dashboard; ?></h5>
|
||||
<a class="btn btn-primary" href="insert-importifytemplate.php" role="button">Insert new template</a>
|
||||
<a class="btn btn-success" href="rsl-category.php" role="button">Import File</a>
|
||||
<a href=""><button type="button" class="btn btn-info w-md waves-effect waves-light">Hystory Import</button></a>
|
||||
<a href="importifydashboard.php"><button type="button" class="btn btn-pink w-md waves-effect waves-light">Importify Dasboard</button></a>
|
||||
<a href="dashboard.php"><button type="button" class="btn btn-danger w-md waves-effect waves-light">Reportify Dasboard</button></a>
|
||||
|
||||
|
||||
<br><br>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm sm-0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th><strong>Template Name</strong></th>
|
||||
<th><strong>Description</strong></th>
|
||||
<th><strong>File Source</strong></th>
|
||||
<th><strong>Lab Name</strong></th>
|
||||
<th><strong>Action</strong></th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $templateimportify = new WA_MySQLi_RS("rsl", $repnew, 0);
|
||||
$templateimportify->setQuery("SELECT * FROM template_importify");
|
||||
$templateimportify->execute();
|
||||
|
||||
$wa_startindex = 0;
|
||||
while (!$templateimportify->atEnd()) {
|
||||
$wa_startindex = $templateimportify->Index;
|
||||
?> <tr>
|
||||
<td><?php echo ($templateimportify->getColumnVal("templatename")); ?></td>
|
||||
<td><?php echo ($templateimportify->getColumnVal("templatedescription")); ?></td>
|
||||
<td><?php echo ($templateimportify->getColumnVal("fileextension")); ?></td>
|
||||
<td><?php echo ($templateimportify->getColumnVal("labname")); ?></td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<a href="columnlink.php?idimporttemplates=<?php echo ($templateimportify->getColumnVal("idimporttemplates")); ?>">
|
||||
<button type="button" class="btn btn-info waves-effect waves-light" data-toggle="tooltip" title="Associate Columns">
|
||||
<i class="fas fa-project-diagram font-size-16 align-middle"></i>
|
||||
</button>
|
||||
</a>
|
||||
<a class="btn btn-warning" href="update-importifytemplate.php?idimporttemplates=<?php echo ($templateimportify->getColumnVal("idimporttemplates")); ?>" role="button" data-toggle="tooltip" title="Go">
|
||||
<i class="fas fa-pencil-alt font-size-16 align-middle"></i>
|
||||
</a>
|
||||
|
||||
<a class="btn btn-danger canc-btn" href="cancel-importifytemplate.php?idimporttemplates=<?php echo ($templateimportify->getColumnVal("idimporttemplates")); ?>" role="button" data-toggle="tooltip" title="Delete">
|
||||
<i class="fas fa-trash font-size-16 align-middle"></i>
|
||||
</a>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php $templateimportify->moveNext();
|
||||
}
|
||||
$templateimportify->moveFirst(); //return RS to first record
|
||||
unset($wa_startindex);
|
||||
unset($wa_repeatcount);
|
||||
|
||||
?></tbody>
|
||||
</table>
|
||||
</div><!--end table-responsive-->
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const deleteButtons = document.querySelectorAll('.canc-btn');
|
||||
|
||||
deleteButtons.forEach(button => {
|
||||
button.addEventListener('click', function(event) {
|
||||
event.preventDefault(); // Previene il comportamento predefinito del link
|
||||
const href = this.getAttribute('href');
|
||||
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'Do you want to cancel the import template?',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, cancel it!',
|
||||
cancelButtonText: 'No, keep it'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = href;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end row -->
|
||||
|
||||
|
||||
</div><!-- container -->
|
||||
|
||||
</div> <!-- Page content Wrapper -->
|
||||
|
||||
</div> <!-- content -->
|
||||
|
||||
<?php include('../include/footer.php'); ?>
|
||||
|
||||
</div>
|
||||
<!-- End Right content here -->
|
||||
|
||||
</div>
|
||||
<!-- END wrapper -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- plugin JS -->
|
||||
<script src="../assets/js/jquery.min.js"></script>
|
||||
<script src="../assets/js/popper.min.js"></script>
|
||||
<script src="../assets/js/bootstrap.min.js"></script>
|
||||
<script src="../assets/js/modernizr.min.js"></script>
|
||||
<script src="../assets/js/detect.js"></script>
|
||||
<script src="../assets/js/fastclick.js"></script>
|
||||
<script src="../assets/js/jquery.slimscroll.js"></script>
|
||||
<script src="../assets/js/jquery.blockUI.js"></script>
|
||||
<script src="../assets/js/waves.js"></script>
|
||||
<script src="../assets/js/jquery.nicescroll.js"></script>
|
||||
<script src="../assets/js/jquery.scrollTo.min.js"></script>
|
||||
|
||||
<script src="../assets/plugins/chart.js/chart.min.js"></script>
|
||||
<script src="../assets/pages/dashboard.js"></script>
|
||||
|
||||
<!-- App js -->
|
||||
<script src="../assets/js/app.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
332
public/userarea/importify/insert-importifytemplate.php
Normal file
332
public/userarea/importify/insert-importifytemplate.php
Normal file
@ -0,0 +1,332 @@
|
||||
<?php include('../include/headscript.php'); ?>
|
||||
<?php include("../class/company.php");
|
||||
?>
|
||||
<?php
|
||||
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
$InsertQuery = new WA_MySQLi_Query($repnew);
|
||||
$InsertQuery->Action = "insert";
|
||||
$InsertQuery->Table = "`template_importify`";
|
||||
|
||||
$InsertQuery->bindColumn("templatename", "s", "" . ((isset($_POST["templatename"])) ? $_POST["templatename"] : "") . "", "WA_DEFAULT");
|
||||
$InsertQuery->bindColumn("templatedescription", "s", "" . ((isset($_POST["templatedescription"])) ? $_POST["templatedescription"] : "") . "", "WA_DEFAULT");
|
||||
$InsertQuery->bindColumn("fileextension", "s", "" . ((isset($_POST["fileextension"])) ? $_POST["fileextension"] : "") . "", "WA_DEFAULT");
|
||||
$InsertQuery->bindColumn("idcompany", "i", "" . ((isset($_POST["idcompany"])) ? $_POST["idcompany"] : "") . "", "WA_DEFAULT");
|
||||
$InsertQuery->bindColumn("iduser", "i", "" . ((isset($_POST["iduser"])) ? $_POST["iduser"] : "") . "", "WA_DEFAULT");
|
||||
$InsertQuery->bindColumn("labname", "s", "" . ((isset($_POST["labname"])) ? $_POST["labname"] : "") . "", "WA_DEFAULT");
|
||||
$InsertQuery->bindColumn("createdon", "s", "" . ((isset($_POST["createdon"])) ? $_POST["createdon"] : "") . "", "WA_DEFAULT");
|
||||
$InsertQuery->saveInSession("");
|
||||
$InsertQuery->execute();
|
||||
|
||||
$InsertGoTo = "importifydashboard.php";
|
||||
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo ? rel2abs($InsertGoTo, dirname(__FILE__)) : "";
|
||||
$InsertQuery->redirect($InsertGoTo);
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (isset($_GET['id'])) {
|
||||
$id = $_GET['id'];
|
||||
}
|
||||
if (isset($_POST['id'])) {
|
||||
$id = $_POST['id'];
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
|
||||
<?php include('../include/seo.php'); ?>
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
||||
<link rel="shortcut icon" href="../assets/images/favicon.ico">
|
||||
|
||||
<link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="../assets/css/icons.css" rel="stylesheet" type="text/css">
|
||||
<link href="../assets/css/style.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/boxicons@2.0.7/css/boxicons.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
/* select2 css */
|
||||
.select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.select2-selection__choice,
|
||||
.select2-selection__choice__remove {
|
||||
background-color: blue !important;
|
||||
color: white !important;
|
||||
border: 1px solid blue !important;
|
||||
}
|
||||
|
||||
/* select2 css end */
|
||||
|
||||
input:invalid {
|
||||
border-color: #ff0000;
|
||||
background-color: #fff7e6;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
input:valid {
|
||||
border-color: #66ff33;
|
||||
background-color: #eeffe6;
|
||||
}
|
||||
|
||||
select:invalid {
|
||||
border-color: #ff0000;
|
||||
background-color: #fff7e6;
|
||||
}
|
||||
|
||||
select:focus {
|
||||
background-color: yellow;
|
||||
}
|
||||
|
||||
select:valid {
|
||||
border-color: #66ff33;
|
||||
background-color: #eeffe6;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body class="fixed-left">
|
||||
|
||||
<!-- Loader -->
|
||||
<div id="preloader">
|
||||
<div id="status">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Begin page -->
|
||||
<div id="wrapper">
|
||||
|
||||
<?php include('../include/navigationbar.php'); ?>
|
||||
|
||||
<!-- Start right Content here -->
|
||||
|
||||
<div class="content-page">
|
||||
<!-- Start content -->
|
||||
<div class="content">
|
||||
|
||||
<?php include('../include/topbar.php'); ?>
|
||||
|
||||
<div class="page-content-wrapper ">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="page-title-box">
|
||||
<div class="btn-group float-right">
|
||||
<ol class="breadcrumb hide-phone p-0 m-0">
|
||||
<li class="breadcrumb-item"><a href="#">Reportify</a></li>
|
||||
<li class="breadcrumb-item active">EasySpec</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">EasySpec</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title end breadcrumb -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="header-title pb-3 mt-0">Importify: Insert new template</h5>
|
||||
|
||||
<div>
|
||||
<form method="post" class="form-horizontal p-t-20" id="updatebeach">
|
||||
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label for="templatename" class="col-md-2 col-form-label">Template Name</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group">
|
||||
|
||||
<input name="templatename" type="text" class="form-control" id="templatename" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label for="templatedescription" class="col-md-2 col-form-label">Template Description</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group">
|
||||
|
||||
<input name="templatedescription" type="text" class="form-control" id="templatedescription">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label for="fileextension" class="col-md-2 col-form-label">File Source Type</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group">
|
||||
<select name="fileextension" required class="form-control" id="fileextension">
|
||||
<option value="" disabled selected>Select file type</option>
|
||||
<option value="XLS">XLS</option>
|
||||
<option value="CSV">CSV</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label for="labname" class="col-md-2 col-form-label">Lab Name</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group">
|
||||
|
||||
<input name="labname" type="text" class="form-control" id="labname" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<td><input name="company_id" type="hidden" id="company_id" value="<?php echo $idcompany; ?>"></td>
|
||||
<?php $createdon = date('Y-m-d H:i:s'); ?>
|
||||
<td><input name="createdon" type="hidden" id="createdon" value="<?php echo $createdon; ?>"></td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<input name="user_id" type="hidden" id="user_id" value="<?php echo $iduserlogin; ?>"></td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td><input name="created_at" type="hidden" id="created_at"></td>
|
||||
<td><input name="updated_at" type="hidden" id="updated_at"></td>
|
||||
<div class="form-group row m-b-0">
|
||||
<div class="offset-sm-3 col-sm-9">
|
||||
<button type="submit" class="btn btn-success waves-effect waves-light">Insert</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body collapse show">
|
||||
<button type="button" onclick="goBack()" class="btn btn-dark waves-effect waves-light"><i class="fa fa-backward"></i> Back</button>
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!--end table-responsive-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end row -->
|
||||
|
||||
|
||||
</div><!-- container -->
|
||||
|
||||
</div> <!-- Page content Wrapper -->
|
||||
|
||||
</div> <!-- content -->
|
||||
|
||||
<?php include('../include/footer.php'); ?>
|
||||
|
||||
</div>
|
||||
<!-- End Right content here -->
|
||||
|
||||
</div>
|
||||
<!-- END wrapper -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// File upload via Ajax
|
||||
$("#uploadForm").on('submit', function(e) {
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'uploadlogorsl.php',
|
||||
data: new FormData(this),
|
||||
contentType: false,
|
||||
cache: false,
|
||||
processData: false,
|
||||
beforeSend: function() {
|
||||
$('#uploadStatus').html('<img src="images/uploading.gif"/>');
|
||||
},
|
||||
error: function() {
|
||||
$('#uploadStatus').html('<span style="color:#EA4335;">Images upload failed, please try again.<span>');
|
||||
},
|
||||
success: function(data) {
|
||||
$('#uploadForm')[0].reset();
|
||||
$('#uploadStatus').html('<span style="color:#28A74B;">Images uploaded successfully.<span>');
|
||||
$('.gallery').html(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// File type validation
|
||||
$("#fileInput").change(function() {
|
||||
var fileLength = this.files.length;
|
||||
var match = ["image/jpeg", "image/png", "image/jpg", "image/gif"];
|
||||
var i;
|
||||
for (i = 0; i < fileLength; i++) {
|
||||
var file = this.files[i];
|
||||
var imagefile = file.type;
|
||||
if (!((imagefile == match[0]) || (imagefile == match[1]) || (imagefile == match[2]) || (imagefile == match[3]))) {
|
||||
alert('Please select a valid image file (JPEG/JPG/PNG/GIF).');
|
||||
$("#fileInput").val('');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".upload-image").click(function() {
|
||||
$(".form-horizontal").ajaxForm({
|
||||
target: '.preview'
|
||||
}).submit();
|
||||
});
|
||||
$('#form').parsley();
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- plugin JS -->
|
||||
<script src="../assets/js/jquery.min.js"></script>
|
||||
<script src="../assets/js/popper.min.js"></script>
|
||||
<script src="../assets/js/bootstrap.min.js"></script>
|
||||
<script src="../assets/js/modernizr.min.js"></script>
|
||||
<script src="../assets/js/detect.js"></script>
|
||||
<script src="../assets/js/fastclick.js"></script>
|
||||
<script src="../assets/js/jquery.slimscroll.js"></script>
|
||||
<script src="../assets/js/jquery.blockUI.js"></script>
|
||||
<script src="../assets/js/waves.js"></script>
|
||||
<script src="../assets/js/jquery.nicescroll.js"></script>
|
||||
<script src="../assets/js/jquery.scrollTo.min.js"></script>
|
||||
|
||||
<script src="../assets/plugins/chart.js/chart.min.js"></script>
|
||||
<script src="../assets/pages/dashboard.js"></script>
|
||||
|
||||
<!-- App js -->
|
||||
<script src="../assets/js/app.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
277
public/userarea/importify/update-importifytemplate.php
Normal file
277
public/userarea/importify/update-importifytemplate.php
Normal file
@ -0,0 +1,277 @@
|
||||
<?php include('../include/headscript.php'); ?>
|
||||
<?php include("../class/company.php"); ?>
|
||||
<?php
|
||||
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
$UpdateQuery = new WA_MySQLi_Query($repnew);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`template_importify`";
|
||||
|
||||
$UpdateQuery->bindColumn("templatename", "s", "" . ((isset($_POST["templatename"])) ? $_POST["templatename"] : "") . "", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("templatedescription", "s", "" . ((isset($_POST["templatedescription"])) ? $_POST["templatedescription"] : "") . "", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("fileextension", "s", "" . ((isset($_POST["fileextension"])) ? $_POST["fileextension"] : "") . "", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("idcompany", "i", "" . ((isset($_POST["idcompany"])) ? $_POST["idcompany"] : "") . "", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("iduser", "i", "" . ((isset($_POST["iduser"])) ? $_POST["iduser"] : "") . "", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("labname", "s", "" . ((isset($_POST["labname"])) ? $_POST["labname"] : "") . "", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("modifiedon", "s", "" . ((isset($_POST["updateon"])) ? $_POST["updateon"] : "") . "", "WA_DEFAULT");
|
||||
|
||||
$UpdateQuery->addFilter("idimporttemplates", "=", "i", "" . ($_GET['idimporttemplates']) . "");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "importifydashboard.php";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (isset($_GET['idimporttemplates'])) {
|
||||
$idimporttemplates = $_GET['idimporttemplates'];
|
||||
}
|
||||
if (isset($_POST['idimporttemplates'])) {
|
||||
$idimporttemplates = $_POST['idimporttemplates'];
|
||||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
$updatequery = new WA_MySQLi_RS("updatequery", $repnew, 0);
|
||||
$updatequery->setQuery("SELECT * FROM template_importify WHERE template_importify.idimporttemplates='$idimporttemplates'");
|
||||
$updatequery->execute();
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
|
||||
<?php include('../include/seo.php'); ?>
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
||||
<link rel="shortcut icon" href="../assets/images/favicon.ico">
|
||||
|
||||
<link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="../assets/css/icons.css" rel="stylesheet" type="text/css">
|
||||
<link href="../assets/css/style.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/boxicons@2.0.7/css/boxicons.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.min.css">
|
||||
|
||||
|
||||
<style>
|
||||
/* select2 css */
|
||||
.select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.select2-selection__choice,
|
||||
.select2-selection__choice__remove {
|
||||
background-color: blue !important;
|
||||
color: white !important;
|
||||
border: 1px solid blue !important;
|
||||
}
|
||||
|
||||
/* select2 css end */
|
||||
|
||||
input:invalid {
|
||||
border-color: #ff0000;
|
||||
background-color: #fff7e6;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
input:valid {
|
||||
border-color: #66ff33;
|
||||
background-color: #eeffe6;
|
||||
}
|
||||
|
||||
select:invalid {
|
||||
border-color: #ff0000;
|
||||
background-color: #fff7e6;
|
||||
}
|
||||
|
||||
select:focus {
|
||||
background-color: yellow;
|
||||
}
|
||||
|
||||
select:valid {
|
||||
border-color: #66ff33;
|
||||
background-color: #eeffe6;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body class="fixed-left">
|
||||
|
||||
<!-- Loader -->
|
||||
<div id="preloader">
|
||||
<div id="status">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Begin page -->
|
||||
<div id="wrapper">
|
||||
|
||||
<?php include('../include/navigationbar.php'); ?>
|
||||
|
||||
<!-- Start right Content here -->
|
||||
|
||||
<div class="content-page">
|
||||
<!-- Start content -->
|
||||
<div class="content">
|
||||
|
||||
<?php include('../include/topbar.php'); ?>
|
||||
|
||||
<div class="page-content-wrapper ">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="page-title-box">
|
||||
<div class="btn-group float-right">
|
||||
<ol class="breadcrumb hide-phone p-0 m-0">
|
||||
<li class="breadcrumb-item"><a href="#">Reportify</a></li>
|
||||
<li class="breadcrumb-item active">EasySpec</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">EasySpec</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title end breadcrumb -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="header-title pb-3 mt-0">EasySpec: <?php echo $dashboard; ?></h5>
|
||||
|
||||
<div>
|
||||
<form method="post" class="form-horizontal p-t-20" id="updatebeach">
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label for="templatename" class="col-md-2 col-form-label">Template Name</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group">
|
||||
|
||||
<input name="templatename" type="text" class="form-control" id="templatename" value="<?php echo ($updatequery->getColumnVal("templatename")); ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label for="templatedescription" class="col-md-2 col-form-label">Template Description</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group">
|
||||
|
||||
<input name="templatedescription" type="text" class="form-control" value="<?php echo ($updatequery->getColumnVal("templatedescription")); ?>" id="templatedescription">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label for="fileextension" class="col-md-2 col-form-label">File Source Type</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group">
|
||||
<select name="fileextension" required class="form-control" id="fileextension">
|
||||
<option value="" disabled <?php echo (!$updatequery->getColumnVal("fileextension") ? 'selected' : ''); ?>>Select file type</option>
|
||||
<option value="XLS" <?php echo ($updatequery->getColumnVal("fileextension") == 'XLS' ? 'selected' : ''); ?>>XLS</option>
|
||||
<option value="CSV" <?php echo ($updatequery->getColumnVal("fileextension") == 'CSV' ? 'selected' : ''); ?>>CSV</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label for="labname" class="col-md-2 col-form-label">Lab Name</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group">
|
||||
|
||||
<input name="labname" type="text" class="form-control" value="<?php echo ($updatequery->getColumnVal("labname")); ?>" id="labname" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<td><input name="company_id" type="hidden" id="company_id" value="<?php echo $idcompany; ?>"></td>
|
||||
<?php $updateon = date('Y-m-d H:i:s'); ?>
|
||||
<td><input name="modifiedon" type="hidden" id="modifiedon" value="<?php echo $updateon; ?>"></td>
|
||||
|
||||
<input name="idimporttemplates" type="hidden" id="idimporttemplates" value="<?php echo $idimporttemplates; ?>"></td>
|
||||
<input name="user_id" type="hidden" id="user_id" value="<?php echo $iduserlogin; ?>"></td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group row m-b-0">
|
||||
<div class="offset-sm-3 col-sm-9">
|
||||
<button type="submit" class="btn btn-success waves-effect waves-light">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body collapse show">
|
||||
<button type="button" onclick="goBack()" class="btn btn-dark waves-effect waves-light"><i class="fa fa-backward"></i> Back</button>
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end row -->
|
||||
</div><!-- container -->
|
||||
</div> <!-- Page content Wrapper -->
|
||||
</div> <!-- content -->
|
||||
<?php include('../include/footer.php'); ?>
|
||||
</div>
|
||||
<!-- End Right content here -->
|
||||
</div>
|
||||
<!-- END wrapper -->
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- plugin JS -->
|
||||
<script src="../assets/js/jquery.min.js"></script>
|
||||
<script src="../assets/js/popper.min.js"></script>
|
||||
<script src="../assets/js/bootstrap.min.js"></script>
|
||||
<script src="../assets/js/modernizr.min.js"></script>
|
||||
<script src="../assets/js/detect.js"></script>
|
||||
<script src="../assets/js/fastclick.js"></script>
|
||||
<script src="../assets/js/jquery.slimscroll.js"></script>
|
||||
<script src="../assets/js/jquery.blockUI.js"></script>
|
||||
<script src="../assets/js/waves.js"></script>
|
||||
<script src="../assets/js/jquery.nicescroll.js"></script>
|
||||
<script src="../assets/js/jquery.scrollTo.min.js"></script>
|
||||
|
||||
<script src="../assets/plugins/chart.js/chart.min.js"></script>
|
||||
<script src="../assets/pages/dashboard.js"></script>
|
||||
|
||||
<!-- App js -->
|
||||
<script src="../assets/js/app.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user