First push

This commit is contained in:
Mathieu Sanchez 2018-10-16 09:19:07 +09:00
parent cb635858f1
commit b491d0ad32
26 changed files with 45 additions and 104 deletions

View File

@ -1,2 +1,2 @@
# base # Web Project for Chung-Ang University web courses
Base for a new from scratch website

View File

@ -1,59 +0,0 @@
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Lun 17 Avril 2017 à 21:00
-- Version du serveur : 5.7.14
-- Version de PHP : 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de données : `base`
--
-- --------------------------------------------------------
--
-- Structure de la table `logs`
--
CREATE TABLE `logs` (
`id` int(10) NOT NULL,
`level` smallint(5) NOT NULL,
`message` varchar(2000) COLLATE utf8_unicode_ci NOT NULL,
`file` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`line` varchar(6) COLLATE utf8_unicode_ci NOT NULL,
`date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Index pour les tables exportées
--
--
-- Index pour la table `logs`
--
ALTER TABLE `logs`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT pour les tables exportées
--
--
-- AUTO_INCREMENT pour la table `logs`
--
ALTER TABLE `logs`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View File

@ -1,18 +1,18 @@
<?php <?php
namespace base; namespace WebProjectFitness;
use base\API\APIRouter; use WebProjectFitness\API\APIRouter;
use base\Controller\Error; use WebProjectFitness\Controller\Error;
use base\Controller\Site\SiteRouter; use WebProjectFitness\Controller\Site\SiteRouter;
use base\Model\BDD; use WebProjectFitness\Model\BDD;
session_start(); session_start();
date_default_timezone_set( 'Europe/Paris' ); date_default_timezone_set( 'Europe/Paris' );
setlocale( LC_TIME, "fr_FR.UTF-8" ); setlocale( LC_TIME, "fr_FR.UTF-8" );
error_reporting( E_ALL ); error_reporting( E_ALL );
require( 'src/lib/functions.php' ); require('src/Lib/functions.php');
require( 'src/config.php' ); require( 'src/config.php' );
require 'src/Autoloader.php'; require 'src/Autoloader.php';

View File

@ -1,8 +1,8 @@
<?php <?php
namespace base\API; namespace WebProjectFitness\API;
use base\Controller\Controller; use WebProjectFitness\Controller\Controller;
class API extends Controller { class API extends Controller {

View File

@ -1,8 +1,8 @@
<?php <?php
namespace base\API; namespace WebProjectFitness\API;
use base\Controller\Controller; use WebProjectFitness\Controller\Controller;
class APIError extends Controller { class APIError extends Controller {

View File

@ -1,8 +1,8 @@
<?php <?php
namespace base\API; namespace WebProjectFitness\API;
use base\Config; use WebProjectFitness\Config;
class APIRouter { class APIRouter {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace base; namespace WebProjectFitness;
class Autoloader { class Autoloader {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace base; namespace WebProjectFitness;
class Config { class Config {
const SITE_JS_VERSION = '1.00'; const SITE_JS_VERSION = '1.00';
@ -8,7 +8,7 @@ class Config {
const TITLE_HEADER = 'Mon titre de site'; const TITLE_HEADER = 'Mon titre de site';
const DESCRIPTION_HEADER = 'Ma description pour les robots'; const DESCRIPTION_HEADER = 'Ma description pour les robots';
const NAMESPACE = 'base'; const NAMESPACE = 'WebProjectFitness';
const FAVICON_PATH = '/img/favicon.png'; const FAVICON_PATH = '/img/favicon.png';
} }

View File

@ -1,8 +1,8 @@
<?php <?php
namespace base\Controller; namespace WebProjectFitness\Controller;
use base\Config; use WebProjectFitness\Config;
class Controller { class Controller {

View File

@ -1,8 +1,8 @@
<?php <?php
namespace base\Controller; namespace WebProjectFitness\Controller;
use base\Config; use WebProjectFitness\Config;
class ControllerSite { class ControllerSite {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace base\Controller; namespace WebProjectFitness\Controller;
class Error extends Controller { class Error extends Controller {

View File

@ -1,8 +1,8 @@
<?php <?php
namespace base\Controller\Site; namespace WebProjectFitness\Controller\Site;
use base\Controller\ControllerSite; use WebProjectFitness\Controller\ControllerSite;
class Index extends ControllerSite { class Index extends ControllerSite {

View File

@ -1,8 +1,8 @@
<?php <?php
namespace base\Controller\Site; namespace WebProjectFitness\Controller\Site;
use base\Controller\ControllerSite; use WebProjectFitness\Controller\ControllerSite;
class SiteError extends ControllerSite { class SiteError extends ControllerSite {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace base\Controller\Site; namespace WebProjectFitness\Controller\Site;
class SiteRouter { class SiteRouter {

View File

@ -1,6 +1,6 @@
<?php <?php
include( 'src/lib/mail/PHPMailerAutoload.php' ); include( 'src/Lib/mail/PHPMailerAutoload.php' );
/** /**
* Permet de remplacer les accents et les apostrophes dans l'url * Permet de remplacer les accents et les apostrophes dans l'url
@ -125,10 +125,10 @@ function errorHandler( $errno, $errstr, $errfile, $errline ) {
} }
// Insertion des logs // Insertion des logs
\base\Model\Logs::insert( $errno, $errstr, $errfile, $errline, date( 'Y-m-d H:i:s' ) ); \WebProjectFitness\Model\Logs::insert( $errno, $errstr, $errfile, $errline, date( 'Y-m-d H:i:s' ) );
ob_clean(); ob_clean();
new \base\Controller\Site\SiteError( 500 ); new \WebProjectFitness\Controller\Site\SiteError( 500 );
/* Ne pas exécuter le gestionnaire interne de PHP */ /* Ne pas exécuter le gestionnaire interne de PHP */

View File

@ -1,15 +1,15 @@
<?php <?php
namespace base\Model; namespace WebProjectFitness\Model;
use Exception; use Exception;
use PDO; use PDO;
class BDD { class BDD {
const SQL_SERVER = 'localhost'; // BDD Server const SQL_SERVER = 'http://web3.pulseheberg.net'; // BDD Server
const SQL_LOGIN = 'root'; // BDD Login const SQL_LOGIN = 'why7n0_fitness'; // BDD Login
const SQL_PASSWORD = ''; // BDD Password const SQL_PASSWORD = 'KpB728zu'; // BDD Password
const SQL_DB = 'base'; // BDD Name const SQL_DB = 'why7n0_fitness'; // BDD Name
private static $bdd; private static $bdd;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace base\Model; namespace WebProjectFitness\Model;
abstract class BDTables { abstract class BDTables {

View File

@ -7,7 +7,7 @@
* Author: Olivier PLATHEY * * Author: Olivier PLATHEY *
*******************************************************************************/ *******************************************************************************/
namespace base\Model; namespace WebProjectFitness\Model;
define( 'FPDF_VERSION', '1.81' ); define( 'FPDF_VERSION', '1.81' );
class FPDF { class FPDF {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace base\Model; namespace WebProjectFitness\Model;
use PDO; use PDO;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace base\Model; namespace WebProjectFitness\Model;
class Model { class Model {

View File

@ -1,6 +1,6 @@
<script src="/js/jquery-3.2.1.min.js"></script> <script src="/js/jquery-3.2.1.min.js"></script>
<script src="/js/javascript.js?v=<?= base\Config::SITE_JS_VERSION ?>"></script> <script src="/js/javascript.js?v=<?= WebProjectFitness\Config::SITE_JS_VERSION ?>"></script>
<link href="/css/style.css?v=<?= base\Config::SITE_CSS_VERSION ?>" rel="stylesheet"> <link href="/css/style.css?v=<?= WebProjectFitness\Config::SITE_CSS_VERSION ?>" rel="stylesheet">
</body> </body>
</html> </html>

View File

@ -18,17 +18,17 @@
<meta property="og:title" content="<?= $this->head['title'] ?>"/> <meta property="og:title" content="<?= $this->head['title'] ?>"/>
<meta property="og:description" content="<?= $this->head['description'] ?>"/> <meta property="og:description" content="<?= $this->head['description'] ?>"/>
<meta property="og:url" content="https://<?= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ?>"/> <meta property="og:url" content="https://<?= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ?>"/>
<meta property="og:image" content="https://<?= $_SERVER['SERVER_NAME'] . \base\Config::FAVICON_PATH ?>"/> <meta property="og:image" content="https://<?= $_SERVER['SERVER_NAME'] . \WebProjectFitness\Config::FAVICON_PATH ?>"/>
<!-- <meta property="fb:app_id" content="1000452166691027" /> --> <!-- <meta property="fb:app_id" content="1000452166691027" /> -->
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700%7CRoboto+Condensed:400,700%7CMaterial+Icons' <link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700%7CRoboto+Condensed:400,700%7CMaterial+Icons'
rel='stylesheet' type='text/css'> rel='stylesheet' type='text/css'>
<link href="/css/theme.css?v=<?= base\Config::SITE_CSS_VERSION ?>" rel="stylesheet"> <link href="/css/theme.css?v=<?= WebProjectFitness\Config::SITE_CSS_VERSION ?>" rel="stylesheet">
<link href="/css/select2.css" rel="stylesheet"> <link href="/css/select2.css" rel="stylesheet">
<link rel="image_src" href="<?php \base\Config::FAVICON_PATH ?>"/> <link rel="image_src" href="<?php \WebProjectFitness\Config::FAVICON_PATH ?>"/>
<link rel="icon" type="image/png" href="<?php \base\Config::FAVICON_PATH ?>"/> <link rel="icon" type="image/png" href="<?php \WebProjectFitness\Config::FAVICON_PATH ?>"/>
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">