Merge remote-tracking branch 'origin' into dev-new-conf
This commit is contained in:
commit
7984a95d17
|
@ -5,3 +5,4 @@ config/config.php
|
||||||
vendor
|
vendor
|
||||||
composer.json
|
composer.json
|
||||||
composer.lock
|
composer.lock
|
||||||
|
/src/Framework/SwiftMailerFactory.php
|
|
@ -24,8 +24,7 @@ require 'vendor/autoload.php';
|
||||||
$chemin = $_SERVER['DOCUMENT_ROOT'];
|
$chemin = $_SERVER['DOCUMENT_ROOT'];
|
||||||
$chemin_new = substr($chemin,0,-6);
|
$chemin_new = substr($chemin,0,-6);
|
||||||
|
|
||||||
$app = (new \Framework\App( $chemin_new .'/config/apply.php'))
|
$app = (new \Framework\App( $chemin_new .'config/apply.php'))
|
||||||
//$app = (new \Framework\App( '../config/apply.php'))
|
|
||||||
->addModule(AdminModule::class)
|
->addModule(AdminModule::class)
|
||||||
->addModule(ContactModule::class)
|
->addModule(ContactModule::class)
|
||||||
->addModule(ProductModule::class)
|
->addModule(ProductModule::class)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
function connexion(nom_connecte, mdp) {
|
function connexion(nom_connecte, mdp, chemin) {
|
||||||
|
$.post('/models/connexion.php', {
|
||||||
$.post("/ajax/connexion.php", {
|
|
||||||
nom_connecte: nom_connecte,
|
nom_connecte: nom_connecte,
|
||||||
mdp: mdp
|
mdp: mdp
|
||||||
}, function (data, status) {
|
}, function (data, status) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ function addRecord(antenne_slug, antenne_id, nom_connecte, id_user) {
|
||||||
var quantite = $("#quantite").val();
|
var quantite = $("#quantite").val();
|
||||||
var prix = $("#prix").val();
|
var prix = $("#prix").val();
|
||||||
// Add record
|
// Add record
|
||||||
$.post("/ajax/addRecord.php", {
|
$.post("/models/addRecord.php", {
|
||||||
produit: produit,
|
produit: produit,
|
||||||
image: nom_image,
|
image: nom_image,
|
||||||
vendeur: vendeur,
|
vendeur: vendeur,
|
||||||
|
@ -46,7 +46,7 @@ function addRecord2(antenne_slug, antenne_id, nom_connecte, id_user) {
|
||||||
var quantite = $("#quantite").val();
|
var quantite = $("#quantite").val();
|
||||||
var prix = $("#prix").val();
|
var prix = $("#prix").val();
|
||||||
// Add record
|
// Add record
|
||||||
$.post("/ajax/addRecord2.php", {
|
$.post("/models/addRecord2.php", {
|
||||||
produit: produit,
|
produit: produit,
|
||||||
image: nom_image,
|
image: nom_image,
|
||||||
acheteur: acheteur,
|
acheteur: acheteur,
|
||||||
|
@ -75,7 +75,7 @@ function addRecord2(antenne_slug, antenne_id, nom_connecte, id_user) {
|
||||||
|
|
||||||
// READ records
|
// READ records
|
||||||
function readRecords(antenne_slug, nom_connecte) {
|
function readRecords(antenne_slug, nom_connecte) {
|
||||||
$.get("/ajax/readRecords.php", {
|
$.get("/models/readRecords.php", {
|
||||||
antenne_slug: antenne_slug,
|
antenne_slug: antenne_slug,
|
||||||
nom_connecte: nom_connecte
|
nom_connecte: nom_connecte
|
||||||
}, function (data, status) {
|
}, function (data, status) {
|
||||||
|
@ -84,7 +84,7 @@ function readRecords(antenne_slug, nom_connecte) {
|
||||||
}
|
}
|
||||||
// READ records2
|
// READ records2
|
||||||
function readRecords2(antenne_slug, nom_connecte) {
|
function readRecords2(antenne_slug, nom_connecte) {
|
||||||
$.get("/ajax/readRecords2.php", {
|
$.get("/models/readRecords2.php", {
|
||||||
antenne_slug: antenne_slug,
|
antenne_slug: antenne_slug,
|
||||||
nom_connecte: nom_connecte
|
nom_connecte: nom_connecte
|
||||||
}, function (data, status) {
|
}, function (data, status) {
|
||||||
|
@ -96,7 +96,7 @@ function DeleteProduits(id, antenne_slug, nom_image) {
|
||||||
$("#hidden_antenne_slug").val(antenne_slug);
|
$("#hidden_antenne_slug").val(antenne_slug);
|
||||||
var conf = confirm("Etes-vous sûr(e) de vouloir supprimer ce bien ou service ?");
|
var conf = confirm("Etes-vous sûr(e) de vouloir supprimer ce bien ou service ?");
|
||||||
if (conf == true) {
|
if (conf == true) {
|
||||||
$.post("/ajax/deleteProduits.php", {
|
$.post("/models/deleteProduits.php", {
|
||||||
id: id,
|
id: id,
|
||||||
antenne_slug: antenne_slug,
|
antenne_slug: antenne_slug,
|
||||||
nom_image: nom_image
|
nom_image: nom_image
|
||||||
|
@ -114,7 +114,7 @@ function DeleteRecherches(id, antenne_slug, nom_image) {
|
||||||
$("#hidden_antenne_slug_r").val(antenne_slug);
|
$("#hidden_antenne_slug_r").val(antenne_slug);
|
||||||
var conf = confirm("Etes-vous sûr(e) de vouloir supprimer ce bien ou service ?");
|
var conf = confirm("Etes-vous sûr(e) de vouloir supprimer ce bien ou service ?");
|
||||||
if (conf == true) {
|
if (conf == true) {
|
||||||
$.post("/ajax/deleteRecherches.php", {
|
$.post("/models/deleteRecherches.php", {
|
||||||
id_r: id,
|
id_r: id,
|
||||||
antenne_slug: antenne_slug,
|
antenne_slug: antenne_slug,
|
||||||
nom_image: nom_image
|
nom_image: nom_image
|
||||||
|
@ -132,7 +132,7 @@ function GetProduitsDetails(id, antenne_slug, nom_image) {
|
||||||
$("#hidden_user_id").val(id);
|
$("#hidden_user_id").val(id);
|
||||||
$("#hidden_antenne_slug").val(antenne_slug);
|
$("#hidden_antenne_slug").val(antenne_slug);
|
||||||
$("#hidden_image_name").val(nom_image);
|
$("#hidden_image_name").val(nom_image);
|
||||||
$.post("/ajax/readProduitsDetails.php", {
|
$.post("/models/readProduitsDetails.php", {
|
||||||
id: id
|
id: id
|
||||||
},
|
},
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
|
@ -153,7 +153,7 @@ function GetRecherchesDetails(id, antenne_slug, nom_image) {
|
||||||
$("#hidden_user_id_r").val(id);
|
$("#hidden_user_id_r").val(id);
|
||||||
$("#hidden_antenne_slug_r").val(antenne_slug);
|
$("#hidden_antenne_slug_r").val(antenne_slug);
|
||||||
$("#hidden_image_name_r").val(nom_image);
|
$("#hidden_image_name_r").val(nom_image);
|
||||||
$.post("/ajax/readRecherchesDetails.php", {
|
$.post("/models/readRecherchesDetails.php", {
|
||||||
id_r: id
|
id_r: id
|
||||||
},
|
},
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
|
@ -180,7 +180,7 @@ function UpdateProduitsDetails(nom_connecte) {
|
||||||
// Champs cachés
|
// Champs cachés
|
||||||
var id = $("#hidden_user_id").val();
|
var id = $("#hidden_user_id").val();
|
||||||
var antenne_slug = $("#hidden_antenne_slug").val();
|
var antenne_slug = $("#hidden_antenne_slug").val();
|
||||||
$.post("/ajax/updateProduitsDetails.php", {
|
$.post("/models/updateProduitsDetails.php", {
|
||||||
id: id,
|
id: id,
|
||||||
produit: produit,
|
produit: produit,
|
||||||
image: nom_image,
|
image: nom_image,
|
||||||
|
@ -208,7 +208,7 @@ function UpdateRecherchesDetails(nom_connecte) {
|
||||||
var id = $("#hidden_user_id_r").val();
|
var id = $("#hidden_user_id_r").val();
|
||||||
var antenne_slug = $("#hidden_antenne_slug_r").val();
|
var antenne_slug = $("#hidden_antenne_slug_r").val();
|
||||||
// Update the details by requesting to the server using ajax
|
// Update the details by requesting to the server using ajax
|
||||||
$.post("/ajax/updateRecherchesDetails.php", {
|
$.post("/models/updateRecherchesDetails.php", {
|
||||||
id: id,
|
id: id,
|
||||||
produit: produit,
|
produit: produit,
|
||||||
image: nom_image,
|
image: nom_image,
|
||||||
|
@ -252,7 +252,7 @@ $(document).ready(function () {
|
||||||
|
|
||||||
// requête AJAX pour copier la photo et l'afficher
|
// requête AJAX pour copier la photo et l'afficher
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/ajax/upload.php',
|
url: '/models/upload.php',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: fd_add,
|
data: fd_add,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
|
@ -283,7 +283,7 @@ $(document).ready(function () {
|
||||||
fd.append('source',source);
|
fd.append('source',source);
|
||||||
// requête AJAX pour copier la photo et l'afficher
|
// requête AJAX pour copier la photo et l'afficher
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/ajax/upload.php',
|
url: '/models/upload.php',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: fd,
|
data: fd,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
session_start();
|
||||||
ini_set('display_errors', 0);
|
ini_set('display_errors', 0);
|
||||||
include '../../config/config.php';
|
include '../../config/config.php';
|
||||||
$antenne_slug = $_GET['antenne_slug'];
|
$antenne_slug = $_GET['antenne_slug'];
|
||||||
$nom_connecte = $_GET['nom_connecte'];
|
$nom_connecte = $_SESSION['user'];
|
||||||
$bdd = new \PDO("mysql:host=$db_server;dbname=$db_name", $db_username, $db_password);
|
$bdd = new \PDO("mysql:host=$db_server;dbname=$db_name", $db_username, $db_password);
|
||||||
|
|
||||||
// Affichage des intitulés de colonnes
|
// Affichage des intitulés de colonnes
|
||||||
|
@ -61,7 +62,7 @@
|
||||||
$data .= '<td>'.$cle_pub_format.'</td>';
|
$data .= '<td>'.$cle_pub_format.'</td>';
|
||||||
$data .= '<td>'.$row['quantite'].'</td>';
|
$data .= '<td>'.$row['quantite'].'</td>';
|
||||||
$data .= '<td>'.$prix.'</td>';
|
$data .= '<td>'.$prix.'</td>';
|
||||||
if ($row['username'] == $_GET['nom_connecte'] ) {
|
if ($row['username'] == $nom_connecte ) {
|
||||||
$data .= '<td>';
|
$data .= '<td>';
|
||||||
$data .= '<button onclick="GetProduitsDetails(\'';
|
$data .= '<button onclick="GetProduitsDetails(\'';
|
||||||
$data .= $row['id'];
|
$data .= $row['id'];
|
|
@ -1,8 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
session_start();
|
||||||
ini_set('display_errors', 0);
|
ini_set('display_errors', 0);
|
||||||
include '../../config/config.php';
|
include '../../config/config.php';
|
||||||
$antenne_slug = $_GET['antenne_slug'];
|
$antenne_slug = $_GET['antenne_slug'];
|
||||||
$nom_connecte = $_GET['nom_connecte'];
|
$nom_connecte = $_SESSION['user'];
|
||||||
$bdd = new \PDO("mysql:host=$db_server;dbname=$db_name", $db_username, $db_password);
|
$bdd = new \PDO("mysql:host=$db_server;dbname=$db_name", $db_username, $db_password);
|
||||||
|
|
||||||
// Affichage des intitulés de colonnes
|
// Affichage des intitulés de colonnes
|
||||||
|
@ -59,7 +60,7 @@
|
||||||
$data .= '<td>'.$pubkeyShort.'...</td>';
|
$data .= '<td>'.$pubkeyShort.'...</td>';
|
||||||
$data .= '<td>'.$row['quantite'].'</td>';
|
$data .= '<td>'.$row['quantite'].'</td>';
|
||||||
$data .= '<td>'.$prix.'</td>';
|
$data .= '<td>'.$prix.'</td>';
|
||||||
if ($row['username'] == $_GET['nom_connecte'] ) {
|
if ($row['username'] == $nom_connecte ) {
|
||||||
$data .= '<td>';
|
$data .= '<td>';
|
||||||
$data .= '<button onclick="GetRecherchesDetails(\'';
|
$data .= '<button onclick="GetRecherchesDetails(\'';
|
||||||
$data .= $row['id'];
|
$data .= $row['id'];
|
|
@ -44,7 +44,7 @@ textInput.onkeyup = function (e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$body.addClass("loading");
|
$body.addClass("loading");
|
||||||
xmlhttp.open("GET","/ajax/getG1PubKey.php?vendeur="+textInput.value,true);
|
xmlhttp.open("GET","/models/getG1PubKey.php?vendeur="+textInput.value,true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
}, 800);
|
}, 800);
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,7 +50,10 @@ class LoginAttemptAction
|
||||||
$params = $request->getParsedBody();
|
$params = $request->getParsedBody();
|
||||||
$user = $this->auth->login($params['username'], $params['password']);
|
$user = $this->auth->login($params['username'], $params['password']);
|
||||||
if ($user) {
|
if ($user) {
|
||||||
$path = $this->session->get('auth.redirect');
|
if(!isset($_SESSION)) {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
$nom_user = $_SESSION['user'] = $params['username'];
|
||||||
$path = $this->session->get('auth.redirect') ?? $this->router->generateUri('gmarche.index');
|
$path = $this->session->get('auth.redirect') ?? $this->router->generateUri('gmarche.index');
|
||||||
$this->session->delete('auth.redirect');
|
$this->session->delete('auth.redirect');
|
||||||
return new RedirectResponse($path);
|
return new RedirectResponse($path);
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||||
<button type="button" class="btn btn-primary"
|
<button type="button" class="btn btn-primary"
|
||||||
onclick="connexion(document.getElementById('pseudo').value,document.getElementById('mdp').value)">Valider</button>
|
onclick="connexion(document.getElementById('pseudo').value,document.getElementById('mdp').value)">Valider</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue