Improve configs files

dev-new-conf
poka 3 years ago
parent 24d3336d00
commit 6cdfb46025

2
.gitignore vendored

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

@ -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)
];

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

@ -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

@ -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

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

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

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

@ -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

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

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

@ -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);

@ -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);

@ -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);

@ -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);

@ -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)

Loading…
Cancel
Save