Improve configs files

This commit is contained in:
poka 2019-11-21 12:57:32 +01:00
parent 24d3336d00
commit 6cdfb46025
16 changed files with 18 additions and 17 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
config/conf.php
config/config.php
.idea
/public/uploads
/tmp

View File

@ -1,5 +1,5 @@
<?php
include 'conf.php';
include 'config.php';
use App\Framework\Twig\UrlExtension;
use Framework\Middleware\CsrfMiddleware;
@ -48,6 +48,6 @@ return [
},
// MAILER
'mail.to' => 'admin@gmarche-testmail.com',
'mail.from' => 'no-reply@admin.fr',
'mail.from' => '$mail_from',
Swift_Mailer::class => \DI\factory(\Framework\SwiftMailerFactory::class)
];

View File

@ -3,4 +3,5 @@
$db_username = '';
$db_password = '';
$db_name = '';
$mail_from = '';
$g1_node = 'https://duniter-g1.p2p.legal';

View File

@ -3,7 +3,7 @@ ini_set('display_errors', 0);
if ($_POST['produit']!== '' && $_POST['vendeur']!== null && $_POST['quantite']>0 && $_POST['prix']>=0) {
// Connexion à la base de données
include '../../config/conf.php';
include '../../config/config.php';
$bdd = new \PDO("mysql:host=$db_server;dbname=$db_name", $db_username, $db_password);
// Récupération des informations du formulaire

View File

@ -3,7 +3,7 @@
if(isset($_POST['produit']) && isset($_POST['acheteur']) && isset($_POST['quantite']) )
{
// Connexion à la base de données
include '../../config/conf.php';
include '../../config/config.php';
$bdd = new \PDO("mysql:host=$db_server;dbname=$db_name", $db_username, $db_password);
// Récupération des informations du formulaire

View File

@ -1,6 +1,6 @@
<?php
include '../../config/conf.php';
include '../../config/config.php';
try {

View File

@ -1,5 +1,5 @@
<?php
include '../../config/conf.php';
include '../../config/config.php';
if($_POST['id'] !== null)
{

View File

@ -1,5 +1,5 @@
<?php
include '../../config/conf.php';
include '../../config/config.php';
if($_POST['id_r'] !== null)
{

View File

@ -1,6 +1,6 @@
<?php
ini_set('display_errors', 0);
include '../../config/conf.php';
include '../../config/config.php';
if(isset($_GET['vendeur']))
{
// Get public key from pseudo

View File

@ -1,6 +1,6 @@
<?php
include '../../config/conf.php';
include '../../config/config.php';
try {

View File

@ -1,6 +1,6 @@
<?php
include '../../config/conf.php';
include '../../config/config.php';
try {

View File

@ -1,6 +1,6 @@
<?php
ini_set('display_errors', 0);
include '../../config/conf.php';
include '../../config/config.php';
$antenne_slug = $_GET['antenne_slug'];
$nom_connecte = $_GET['nom_connecte'];
$bdd = new \PDO("mysql:host=$db_server;dbname=$db_name", $db_username, $db_password);

View File

@ -1,6 +1,6 @@
<?php
ini_set('display_errors', 0);
include '../../config/conf.php';
include '../../config/config.php';
$antenne_slug = $_GET['antenne_slug'];
$nom_connecte = $_GET['nom_connecte'];
$bdd = new \PDO("mysql:host=$db_server;dbname=$db_name", $db_username, $db_password);

View File

@ -1,6 +1,6 @@
<?php
include '../../config/conf.php';
include '../../config/config.php';
$bdd = new \PDO("mysql:host=$db_server;dbname=$db_name", $db_username, $db_password);

View File

@ -1,6 +1,6 @@
<?php
include '../../config/conf.php';
include '../../config/config.php';
$bdd = new \PDO("mysql:host=$db_server;dbname=$db_name", $db_username, $db_password);

View File

@ -24,8 +24,8 @@ require 'vendor/autoload.php';
$chemin = $_SERVER['DOCUMENT_ROOT'];
$chemin_new = substr($chemin,0,-6);
$app = (new \Framework\App( $chemin_new .'/config/config.php'))
//$app = (new \Framework\App( '../config/config.php'))
$app = (new \Framework\App( $chemin_new .'/config/apply.php'))
//$app = (new \Framework\App( '../config/apply.php'))
->addModule(AdminModule::class)
->addModule(ContactModule::class)
->addModule(ProductModule::class)