First push
This commit is contained in:
parent
cb635858f1
commit
b491d0ad32
@ -1,2 +1,2 @@
|
||||
# base
|
||||
Base for a new from scratch website
|
||||
# Web Project for Chung-Ang University web courses
|
||||
|
||||
|
59
base.sql
59
base.sql
@ -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 */;
|
12
index.php
12
index.php
@ -1,18 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace base;
|
||||
namespace WebProjectFitness;
|
||||
|
||||
use base\API\APIRouter;
|
||||
use base\Controller\Error;
|
||||
use base\Controller\Site\SiteRouter;
|
||||
use base\Model\BDD;
|
||||
use WebProjectFitness\API\APIRouter;
|
||||
use WebProjectFitness\Controller\Error;
|
||||
use WebProjectFitness\Controller\Site\SiteRouter;
|
||||
use WebProjectFitness\Model\BDD;
|
||||
|
||||
session_start();
|
||||
date_default_timezone_set( 'Europe/Paris' );
|
||||
setlocale( LC_TIME, "fr_FR.UTF-8" );
|
||||
error_reporting( E_ALL );
|
||||
|
||||
require( 'src/lib/functions.php' );
|
||||
require('src/Lib/functions.php');
|
||||
require( 'src/config.php' );
|
||||
|
||||
require 'src/Autoloader.php';
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace base\API;
|
||||
namespace WebProjectFitness\API;
|
||||
|
||||
use base\Controller\Controller;
|
||||
use WebProjectFitness\Controller\Controller;
|
||||
|
||||
class API extends Controller {
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace base\API;
|
||||
namespace WebProjectFitness\API;
|
||||
|
||||
use base\Controller\Controller;
|
||||
use WebProjectFitness\Controller\Controller;
|
||||
|
||||
class APIError extends Controller {
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace base\API;
|
||||
namespace WebProjectFitness\API;
|
||||
|
||||
use base\Config;
|
||||
use WebProjectFitness\Config;
|
||||
|
||||
class APIRouter {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace base;
|
||||
namespace WebProjectFitness;
|
||||
|
||||
class Autoloader {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace base;
|
||||
namespace WebProjectFitness;
|
||||
|
||||
class Config {
|
||||
const SITE_JS_VERSION = '1.00';
|
||||
@ -8,7 +8,7 @@ class Config {
|
||||
|
||||
const TITLE_HEADER = 'Mon titre de site';
|
||||
const DESCRIPTION_HEADER = 'Ma description pour les robots';
|
||||
const NAMESPACE = 'base';
|
||||
const NAMESPACE = 'WebProjectFitness';
|
||||
|
||||
const FAVICON_PATH = '/img/favicon.png';
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace base\Controller;
|
||||
namespace WebProjectFitness\Controller;
|
||||
|
||||
use base\Config;
|
||||
use WebProjectFitness\Config;
|
||||
|
||||
class Controller {
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace base\Controller;
|
||||
namespace WebProjectFitness\Controller;
|
||||
|
||||
use base\Config;
|
||||
use WebProjectFitness\Config;
|
||||
|
||||
class ControllerSite {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace base\Controller;
|
||||
namespace WebProjectFitness\Controller;
|
||||
|
||||
class Error extends Controller {
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace base\Controller\Site;
|
||||
namespace WebProjectFitness\Controller\Site;
|
||||
|
||||
use base\Controller\ControllerSite;
|
||||
use WebProjectFitness\Controller\ControllerSite;
|
||||
|
||||
class Index extends ControllerSite {
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace base\Controller\Site;
|
||||
namespace WebProjectFitness\Controller\Site;
|
||||
|
||||
use base\Controller\ControllerSite;
|
||||
use WebProjectFitness\Controller\ControllerSite;
|
||||
|
||||
class SiteError extends ControllerSite {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace base\Controller\Site;
|
||||
namespace WebProjectFitness\Controller\Site;
|
||||
|
||||
class SiteRouter {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
include( 'src/lib/mail/PHPMailerAutoload.php' );
|
||||
include( 'src/Lib/mail/PHPMailerAutoload.php' );
|
||||
|
||||
/**
|
||||
* Permet de remplacer les accents et les apostrophes dans l'url
|
||||
@ -125,10 +125,10 @@ function errorHandler( $errno, $errstr, $errfile, $errline ) {
|
||||
}
|
||||
|
||||
// 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();
|
||||
new \base\Controller\Site\SiteError( 500 );
|
||||
new \WebProjectFitness\Controller\Site\SiteError( 500 );
|
||||
|
||||
/* Ne pas exécuter le gestionnaire interne de PHP */
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace base\Model;
|
||||
namespace WebProjectFitness\Model;
|
||||
|
||||
use Exception;
|
||||
use PDO;
|
||||
|
||||
class BDD {
|
||||
const SQL_SERVER = 'localhost'; // BDD Server
|
||||
const SQL_LOGIN = 'root'; // BDD Login
|
||||
const SQL_PASSWORD = ''; // BDD Password
|
||||
const SQL_DB = 'base'; // BDD Name
|
||||
const SQL_SERVER = 'http://web3.pulseheberg.net'; // BDD Server
|
||||
const SQL_LOGIN = 'why7n0_fitness'; // BDD Login
|
||||
const SQL_PASSWORD = 'KpB728zu'; // BDD Password
|
||||
const SQL_DB = 'why7n0_fitness'; // BDD Name
|
||||
|
||||
private static $bdd;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace base\Model;
|
||||
namespace WebProjectFitness\Model;
|
||||
|
||||
abstract class BDTables {
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Author: Olivier PLATHEY *
|
||||
*******************************************************************************/
|
||||
|
||||
namespace base\Model;
|
||||
namespace WebProjectFitness\Model;
|
||||
define( 'FPDF_VERSION', '1.81' );
|
||||
|
||||
class FPDF {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace base\Model;
|
||||
namespace WebProjectFitness\Model;
|
||||
|
||||
use PDO;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace base\Model;
|
||||
namespace WebProjectFitness\Model;
|
||||
|
||||
class Model {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script src="/js/jquery-3.2.1.min.js"></script>
|
||||
<script src="/js/javascript.js?v=<?= base\Config::SITE_JS_VERSION ?>"></script>
|
||||
<link href="/css/style.css?v=<?= base\Config::SITE_CSS_VERSION ?>" rel="stylesheet">
|
||||
<script src="/js/javascript.js?v=<?= WebProjectFitness\Config::SITE_JS_VERSION ?>"></script>
|
||||
<link href="/css/style.css?v=<?= WebProjectFitness\Config::SITE_CSS_VERSION ?>" rel="stylesheet">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -18,17 +18,17 @@
|
||||
<meta property="og:title" content="<?= $this->head['title'] ?>"/>
|
||||
<meta property="og:description" content="<?= $this->head['description'] ?>"/>
|
||||
<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" /> -->
|
||||
|
||||
<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'>
|
||||
|
||||
<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 rel="image_src" href="<?php \base\Config::FAVICON_PATH ?>"/>
|
||||
<link rel="icon" type="image/png" href="<?php \base\Config::FAVICON_PATH ?>"/>
|
||||
<link rel="image_src" href="<?php \WebProjectFitness\Config::FAVICON_PATH ?>"/>
|
||||
<link rel="icon" type="image/png" href="<?php \WebProjectFitness\Config::FAVICON_PATH ?>"/>
|
||||
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user