update nude-sand index
update in order to make it simple to understand
This commit is contained in:
parent
397d0c2972
commit
4f4743ba8b
34
.gitignore
vendored
34
.gitignore
vendored
|
@ -1,18 +1,18 @@
|
||||||
/composer.lock
|
composer.lock
|
||||||
/vendor/*
|
vendor
|
||||||
/_relicats
|
_relicats
|
||||||
/.idea
|
.idea
|
||||||
|
|
||||||
/application/modules/phplist
|
# Avoid directory tests install of third party application module
|
||||||
/application/modules/symfony
|
application/modules/phplist
|
||||||
/application/modules/wordpress
|
application/modules/symfony
|
||||||
/application/modules/prestashop
|
application/modules/wordpress
|
||||||
|
application/modules/prestashop
|
||||||
/public/prestashop/install-dev/theme/*
|
public/prestashop/install-dev/theme/*
|
||||||
/public/prestashop/js/*
|
public/prestashop/js/*
|
||||||
/public/prestashop/themes/*
|
public/prestashop/themes/*
|
||||||
/public/wordpress/wp-admin/css/*
|
public/wordpress/wp-admin/css/*
|
||||||
/public/wordpress/wp-admin/js/*
|
public/wordpress/wp-admin/js/*
|
||||||
/public/wordpress/wp-content/themes/*
|
public/wordpress/wp-content/themes/*
|
||||||
/public/wordpress/wp-includes/css/*
|
public/wordpress/wp-includes/css/*
|
||||||
/public/wordpress/wp-includes/js/*
|
public/wordpress/wp-includes/js/*
|
||||||
|
|
|
@ -10,28 +10,58 @@ class Bdd
|
||||||
{
|
{
|
||||||
switch($bdd) {
|
switch($bdd) {
|
||||||
case 'bdd1':
|
case 'bdd1':
|
||||||
$this->bdd = new PDO(DSN_BDD1, USER_BDD1, PASS_BDD1);
|
$this->bdd = new \PDO(DSN_BDD1, USER_BDD1, PASS_BDD1);
|
||||||
break;
|
break;
|
||||||
case 'bdd2':
|
case 'bdd2':
|
||||||
$this->bdd = new PDO(DSN_BDD2, USER_BDD2, PASS_BDD2);
|
$this->bdd = new \PDO(DSN_BDD2, USER_BDD2, PASS_BDD2);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->bdd = new PDO(DSN_BDD_DEFAULT, USER_BDD_DEFAULT, PASS_BDD_DEFAULT);
|
$this->bdd = new \PDO(DSN_BDD_DEFAULT, USER_BDD_DEFAULT, PASS_BDD_DEFAULT);
|
||||||
}
|
}
|
||||||
|
$this->bdd->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING);
|
||||||
|
$this->bdd->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function faireUneRequete($sql)
|
public function faireSQLRequete($sql)
|
||||||
{
|
{
|
||||||
$req = $this->bdd->query($sql, PDO::FETCH_ASSOC);
|
$req = $this->bdd->query($sql);
|
||||||
return $req;
|
return $req;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exploiterResultat($res){
|
/**
|
||||||
|
*
|
||||||
|
* Exemple:
|
||||||
|
* $sql = "SELECT * FROM annonce WHERE cat_id = :categorie and ann_est_valide = 1";
|
||||||
|
* $req = $bdd->faireBindRequete($sql,
|
||||||
|
* array(
|
||||||
|
* array('categorie', $categorie, \PDO::PARAM_INT),
|
||||||
|
* )
|
||||||
|
* );
|
||||||
|
* $data = $bdd->exploiterResultat($req)
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param $sql
|
||||||
|
* @param array|null $params
|
||||||
|
* @return bool|\PDOStatement
|
||||||
|
*/
|
||||||
|
public function faireBindRequete($sql,Array $params = null){
|
||||||
|
$req = $this->bdd->prepare($sql);
|
||||||
|
if($params){
|
||||||
|
foreach ($params as $value) {
|
||||||
|
$req->bindParam($value[0],Caracter::normalise_ChaineDeCaracteres($value[1]),$value[2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$req->execute();
|
||||||
|
//$req->closeCursor();
|
||||||
|
return $req;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function exploiterResultat($req){
|
||||||
|
$res = $req->fetchAll();
|
||||||
foreach($res as $data) {
|
foreach($res as $data) {
|
||||||
foreach ($data as $key => $row) {
|
foreach ($data as $key => $row) {
|
||||||
if (is_string($row)) {
|
if (is_string($row)) {
|
||||||
$row = Caracter::normalise_ChaineDeCaracteresDownload($row);
|
$row = Caracter::normalise_ChaineDeCaracteres($row);
|
||||||
}
|
}
|
||||||
$data[$key] = $row;
|
$data[$key] = $row;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,8 @@ use ForceUTF8\Encoding;
|
||||||
class Caracter
|
class Caracter
|
||||||
{
|
{
|
||||||
|
|
||||||
public static function normalise_ChaineDeCaracteresDownload($chaine)
|
public static function normalise_ChaineDeCaracteres($chaine)
|
||||||
{
|
{
|
||||||
//return Caracter::remplacerAccents($chaine);
|
|
||||||
return Encoding::fixUTF8(Caracter::fp_stripslashes($chaine));
|
return Encoding::fixUTF8(Caracter::fp_stripslashes($chaine));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,12 @@ class Url
|
||||||
public function __construct($method, $appRequest)
|
public function __construct($method, $appRequest)
|
||||||
{
|
{
|
||||||
|
|
||||||
//on créé le registre des modules symfony
|
//on créé le registre des modules d'applications tierces
|
||||||
$this->registre = new \MVC\Classe\ModularRegister();
|
$this->registre = new \MVC\Classe\ModularRegister();
|
||||||
|
|
||||||
//définition des parametres de base
|
//définition des parametres de base
|
||||||
$page = array();
|
$page = array();
|
||||||
$page['name'] = 'accueil';
|
$page['name'] = 'index';
|
||||||
$page['description'] = "";
|
$page['description'] = "";
|
||||||
$page['params'] = array();
|
$page['params'] = array();
|
||||||
$page['control'] = false;
|
$page['control'] = false;
|
||||||
|
@ -32,11 +32,10 @@ class Url
|
||||||
//print_r($urlParts);
|
//print_r($urlParts);
|
||||||
if(isset($urlParts[0])) {
|
if(isset($urlParts[0])) {
|
||||||
//Récupération du nom de la page
|
//Récupération du nom de la page
|
||||||
($urlParts[0] == 'index' || $urlParts[0] == '') ? $page['name'] = 'accueil' : $page['name'] = $urlParts[0];
|
($urlParts[0] == 'index' || $urlParts[0] == '') ? $page['name'] = 'index' : $page['name'] = $urlParts[0];
|
||||||
//array_shift($urlParts);
|
|
||||||
unset($urlParts[0]);
|
unset($urlParts[0]);
|
||||||
}else{
|
}else{
|
||||||
$page['name'] = 'accueil';
|
$page['name'] = 'index';
|
||||||
}
|
}
|
||||||
|
|
||||||
//il se peut que l'on ait des variable avec ? dans l'url
|
//il se peut que l'on ait des variable avec ? dans l'url
|
||||||
|
@ -47,8 +46,7 @@ class Url
|
||||||
|
|
||||||
if($page['name'] == 'control'){
|
if($page['name'] == 'control'){
|
||||||
$page['control'] = true;
|
$page['control'] = true;
|
||||||
($urlParts[1] == 'index' || $urlParts[1] == '' ) ? $page['name']='accueil' : $page['name']=$urlParts[1];
|
($urlParts[1] == 'index' || $urlParts[1] == '' ) ? $page['name']='index' : $page['name']=$urlParts[1];
|
||||||
//array_shift($urlParts);
|
|
||||||
unset($urlParts[1]);
|
unset($urlParts[1]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -63,7 +61,7 @@ class Url
|
||||||
$page['params'] = array();
|
$page['params'] = array();
|
||||||
$this->page = $page;
|
$this->page = $page;
|
||||||
return;
|
return;
|
||||||
}else {
|
} else {
|
||||||
foreach ($urlParts as $key => $value) {
|
foreach ($urlParts as $key => $value) {
|
||||||
$values[] = $value;
|
$values[] = $value;
|
||||||
$keys[] = $key;
|
$keys[] = $key;
|
||||||
|
|
|
@ -20,6 +20,9 @@ class Vue{
|
||||||
|
|
||||||
//l'inclusion du controlleur doit renvoyer le tableau $templateData
|
//l'inclusion du controlleur doit renvoyer le tableau $templateData
|
||||||
require CONTROLLER_PATH . DIRECTORY_SEPARATOR . $name . '.php';
|
require CONTROLLER_PATH . DIRECTORY_SEPARATOR . $name . '.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//TEMPLATING BLADE
|
//TEMPLATING BLADE
|
||||||
$paths = new \SplPriorityQueue;
|
$paths = new \SplPriorityQueue;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
home_route:
|
home_route:
|
||||||
path: /
|
path: /
|
||||||
defaults: { controller: 'FooController::indexAction' }
|
defaults: { controller: '' }
|
||||||
|
|
||||||
foo_route:
|
foo_route:
|
||||||
path: /foo
|
path: /foo
|
||||||
|
@ -11,11 +11,3 @@ foo_placeholder_route:
|
||||||
defaults: { controller: 'FooConduit::load' }
|
defaults: { controller: 'FooConduit::load' }
|
||||||
requirements:
|
requirements:
|
||||||
id: '[0-9]+'
|
id: '[0-9]+'
|
||||||
|
|
||||||
docs_route:
|
|
||||||
path: /docs
|
|
||||||
defaults: { controller: 'DocConduit::index' }
|
|
||||||
|
|
||||||
docs_name_route:
|
|
||||||
path: /docs/file/{name}
|
|
||||||
defaults: { controller: 'DocConduit::readfile' }
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use MVC\Classe\Dumper;
|
|
||||||
use MVC\Classe\HttpMethodRequete;
|
|
||||||
use MVC\Classe\Implement\Action;
|
|
||||||
use MVC\Classe\Url;
|
|
||||||
use MVC\Classe\Response;
|
|
||||||
|
|
||||||
class MenudocsAction extends Action
|
|
||||||
{
|
|
||||||
public function default($data)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
$files = array();
|
|
||||||
|
|
||||||
if ($handle = opendir(DATA_PATH.'/docs')) {
|
|
||||||
|
|
||||||
while (false !== ($entry = readdir($handle))) {
|
|
||||||
|
|
||||||
if ($entry != "." && $entry != "..") {
|
|
||||||
|
|
||||||
$files[] = $entry;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
asort($files);
|
|
||||||
|
|
||||||
return $this->render('menu-docs', array('files'=>$files));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Michelf\MarkdownExtra;
|
|
||||||
use MVC\Classe\Implement\Conduit;
|
|
||||||
|
|
||||||
class DocConduit extends Conduit
|
|
||||||
{
|
|
||||||
// Route('/docs')
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
|
|
||||||
$files = array();
|
|
||||||
|
|
||||||
if ($handle = opendir(DATA_PATH.'/docs')) {
|
|
||||||
|
|
||||||
while (false !== ($entry = readdir($handle))) {
|
|
||||||
|
|
||||||
if ($entry != "." && $entry != "..") {
|
|
||||||
|
|
||||||
$files[] = $entry;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
asort($files);
|
|
||||||
|
|
||||||
return $this->render('docs', array('page_title' => 'Foo', 'description' => 'DocConduit','files' => $files));
|
|
||||||
}
|
|
||||||
// Route('/docs/file/{name}')
|
|
||||||
public function readfile(){
|
|
||||||
|
|
||||||
$markdown = file_get_contents(DATA_PATH.'/docs/'.$this->name);
|
|
||||||
|
|
||||||
$my_html = MarkdownExtra::defaultTransform($markdown);
|
|
||||||
|
|
||||||
return $this->render('docs', array('page_title' => 'Foo', 'description' => 'DocConduit','data' => $my_html));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
15
application/include/conduits/IndexConduit.php
Normal file
15
application/include/conduits/IndexConduit.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
use MVC\Classe\Implement\Conduit;
|
||||||
|
|
||||||
|
class IndexConduit extends Conduit
|
||||||
|
{
|
||||||
|
// Route('/')
|
||||||
|
public function homepage()
|
||||||
|
{
|
||||||
|
echo "IndexControlleur";
|
||||||
|
return $this->render('index', array("templating_a"=>'blade',"templating_b"=>'twig',"templating_c"=>'edge'));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,45 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use MVC\Classe\Dumper;
|
|
||||||
use MVC\Classe\Implement\RestReponse;
|
|
||||||
use MVC\Classe\Logger;
|
|
||||||
|
|
||||||
class AccueilHttpReponse extends RestReponse
|
|
||||||
{
|
|
||||||
|
|
||||||
public function put()
|
|
||||||
{
|
|
||||||
ob_start();
|
|
||||||
Dumper::dump($this->params);
|
|
||||||
Dumper::dump($this->data);
|
|
||||||
$text = ob_get_clean();
|
|
||||||
Logger::addLog('http11.put', '____Hello Put____' . PHP_EOL . $text);
|
|
||||||
}
|
|
||||||
public function delete()
|
|
||||||
{
|
|
||||||
ob_start();
|
|
||||||
Dumper::dump($this->params);
|
|
||||||
Dumper::dump($this->data);
|
|
||||||
$text = ob_get_clean();
|
|
||||||
Logger::addLog('http11.delete', '____Hello Delete:____' . PHP_EOL . $text);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function get()
|
|
||||||
{
|
|
||||||
ob_start();
|
|
||||||
Dumper::dump($this->params);
|
|
||||||
Dumper::dump($this->data);
|
|
||||||
$text = ob_get_clean();
|
|
||||||
Logger::addLog('http11.get', '____Hello GET____' . PHP_EOL . $text);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function post()
|
|
||||||
{
|
|
||||||
ob_start();
|
|
||||||
Dumper::dump($this->params);
|
|
||||||
Dumper::dump($this->data);
|
|
||||||
$text = ob_get_clean();
|
|
||||||
Logger::addLog('http11.post', '____Hello POST____' . PHP_EOL . $text);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use MVC\Classe\Implement\RestReponse;
|
|
||||||
use MVC\Classe\Logger;
|
|
||||||
|
|
||||||
class ErrorHttpReponse extends RestReponse
|
|
||||||
{
|
|
||||||
public function put()
|
|
||||||
{
|
|
||||||
Logger::addLog('put', 'Error PUT');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function delete()
|
|
||||||
{
|
|
||||||
Logger::addLog('delete', 'Error DELETE');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function get()
|
|
||||||
{
|
|
||||||
Logger::addLog('get', 'Error GET');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function post()
|
|
||||||
{
|
|
||||||
Logger::addLog('post', 'Error POST');
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use MVC\Classe\Dumper;
|
|
||||||
|
|
||||||
require CONFIG_PATH . DIRECTORY_SEPARATOR . "authentification-config-example.php";
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
\MVC\Classe\Session::start();
|
|
||||||
|
|
||||||
$hybridauth = new Hybridauth\Hybridauth($config);
|
|
||||||
$storage = new Hybridauth\Storage\Session();
|
|
||||||
$error = false;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Event 1: User clicked SIGN-IN link
|
|
||||||
//
|
|
||||||
if (isset($url_params['provider'])) {
|
|
||||||
// Validate provider exists in the $config
|
|
||||||
if (in_array($url_params['provider'], $hybridauth->getProviders())) {
|
|
||||||
// Store the provider for the callback event
|
|
||||||
$storage->set('provider', $url_params['provider']);
|
|
||||||
\MVC\Classe\Session::setStorage($storage);
|
|
||||||
\MVC\Classe\Session::setUserProfile(array());
|
|
||||||
} else {
|
|
||||||
$error = $url_params['provider'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Event 2: User clicked LOGOUT link
|
|
||||||
//
|
|
||||||
if (isset($url_params['logout'])) {
|
|
||||||
if (in_array($url_params['logout'], $hybridauth->getProviders())) {
|
|
||||||
// Disconnect the adapter
|
|
||||||
$adapter = $hybridauth->getAdapter($url_params['logout']);
|
|
||||||
$adapter->disconnect();
|
|
||||||
} else {
|
|
||||||
$error = $url_params['logout'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Event 3: Provider returns via CALLBACK
|
|
||||||
//
|
|
||||||
if ($url_params['provider'] = $storage->get('provider')) {
|
|
||||||
|
|
||||||
\MVC\Classe\Session::setHybridAuth($hybridauth);
|
|
||||||
$hybridauth->authenticate($url_params['provider']);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception $e) {
|
|
||||||
error_log($e->getMessage());
|
|
||||||
echo $e->getMessage();
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
\MVC\Classe\Session::start();
|
|
||||||
|
|
||||||
require CONFIG_PATH . DIRECTORY_SEPARATOR . "authentification-config-example.php";
|
|
||||||
|
|
||||||
$hybridauth = new Hybridauth\Hybridauth($config);
|
|
||||||
$adapters = $hybridauth->getConnectedAdapters();
|
|
||||||
|
|
||||||
$templateData['hybridauth'] = $hybridauth;
|
|
||||||
$templateData['adapters'] = $adapters;
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
use MVC\Classe\Logger;
|
|
||||||
|
|
||||||
$templateData = array("templating_a"=>'blade',"templating_b"=>'twig',"templating_c"=>'edge');
|
|
||||||
Logger::addLog('ok', 'Hello world');
|
|
|
@ -1,22 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use MVC\Classe\Dumper;
|
|
||||||
|
|
||||||
\MVC\Classe\Session::start();
|
|
||||||
\MVC\Classe\Session::redirectIfNotRegistered();
|
|
||||||
|
|
||||||
require CONFIG_PATH . DIRECTORY_SEPARATOR . "authentification-config-example.php";
|
|
||||||
|
|
||||||
$hybridauth = new Hybridauth\Hybridauth($config);
|
|
||||||
$hybridauth->authenticate(\MVC\Classe\Session::getStorage()->get('provider'));
|
|
||||||
$adapters = $hybridauth->getConnectedAdapters();
|
|
||||||
foreach ($adapters as $adapter){
|
|
||||||
$userProfile[] = $adapter->getUserProfile();
|
|
||||||
\MVC\Classe\Session::setId($adapter->getUserProfile()->identifier);
|
|
||||||
\MVC\Classe\Session::setUserName($adapter->getUserProfile()->displayName);
|
|
||||||
}
|
|
||||||
\MVC\Classe\Session::setUserProfile($userProfile);
|
|
||||||
|
|
||||||
//Dumper::dump($_SESSION);
|
|
||||||
|
|
||||||
$templateData['adapters'] = $adapters;
|
|
|
@ -1,34 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use MVC\Classe\Dumper;
|
|
||||||
|
|
||||||
require CONFIG_PATH . DIRECTORY_SEPARATOR . "authentification-config-example.php";
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
\MVC\Classe\Session::start();
|
|
||||||
|
|
||||||
$hybridauth = new Hybridauth\Hybridauth($config);
|
|
||||||
$storage = new Hybridauth\Storage\Session();
|
|
||||||
$error = false;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Event 2: User clicked LOGOUT link
|
|
||||||
//
|
|
||||||
if (isset($url_params['logout'])) {
|
|
||||||
if (in_array($url_params['logout'], $hybridauth->getProviders())) {
|
|
||||||
// Disconnect the adapter
|
|
||||||
$adapter = $hybridauth->getAdapter($url_params['logout']);
|
|
||||||
$adapter->disconnect();
|
|
||||||
\MVC\Classe\Session::destroy();
|
|
||||||
header("location: ".MVC\Classe\Url::link_rewrite(false,'accueil'));
|
|
||||||
} else {
|
|
||||||
$error = $url_params['logout'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception $e) {
|
|
||||||
error_log($e->getMessage());
|
|
||||||
echo $e->getMessage();
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
name : authentificate
|
|
||||||
page_title: Hybrid Authentification de l'application
|
|
||||||
description : La page d'authentification
|
|
||||||
params : params
|
|
|
@ -1,4 +0,0 @@
|
||||||
name : authentification
|
|
||||||
page_title: Hybrid Authentification de l'application
|
|
||||||
description : La page d'authentification
|
|
||||||
params : params
|
|
|
@ -1,5 +0,0 @@
|
||||||
name : beers
|
|
||||||
page_title : module_title
|
|
||||||
description : module_description
|
|
||||||
params : module_params
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
name : compte
|
|
||||||
page_title: Compte(s) utilisateurs de l'application
|
|
||||||
description : La page d'accès privé
|
|
||||||
params : params
|
|
|
@ -1,4 +1,4 @@
|
||||||
name : accueil
|
name : index
|
||||||
page_title : Accueil de l'application
|
page_title : Accueil de l'application
|
||||||
description : zatou stra bracadabla
|
description : zatou stra bracadabla
|
||||||
params : params
|
params : params
|
|
@ -1,4 +0,0 @@
|
||||||
name : logout
|
|
||||||
page_title: Hybrid Authentification de l'application
|
|
||||||
description : La page d'authentification
|
|
||||||
params : params
|
|
|
@ -10,28 +10,13 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<ul class="top-menu">
|
<ul class="top-menu">
|
||||||
<li><a href="#">About</a></li>
|
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'Admin', []) }}">Admin</a></li>
|
||||||
<li><a href="#">Features</a></li>
|
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'Create', []) }}">Create</a></li>
|
||||||
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'Beers', []) }}">Pricing</a></li>
|
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'Beers', []) }}">Pricing</a></li>
|
||||||
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'Policy', []) }}">Policy</a></li>
|
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'Policy', []) }}">Policy</a></li>
|
||||||
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'CGU', []) }}"> CGU Terms</a></li>
|
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'CGU', []) }}"> CGU Terms</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 d-none d-sm-block">
|
|
||||||
<div class="social-icons social-icons-colored-hover">
|
|
||||||
<ul>
|
|
||||||
<li class="social-facebook"><a href="#"><i class="fab fa-facebook-f"></i></a></li>
|
|
||||||
<li class="social-twitter"><a href="#"><i class="fab fa-twitter"></i></a></li>
|
|
||||||
<li class="social-google"><a href="#"><i class="fab fa-google-plus-g"></i></a></li>
|
|
||||||
<li class="social-pinterest"><a href="#"><i class="fab fa-pinterest"></i></a></li>
|
|
||||||
<li class="social-vimeo"><a href="#"><i class="fab fa-vimeo"></i></a></li>
|
|
||||||
<li class="social-linkedin"><a href="#"><i class="fab fa-linkedin"></i></a></li>
|
|
||||||
<li class="social-dribbble"><a href="#"><i class="fab fa-dribbble"></i></a></li>
|
|
||||||
<li class="social-youtube"><a href="#"><i class="fab fa-youtube"></i></a></li>
|
|
||||||
<li class="social-rss"><a href="#"><i class="fa fa-rss"></i></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,39 +29,11 @@
|
||||||
<!--Logo-->
|
<!--Logo-->
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'accueil', []) }}">
|
<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'accueil', []) }}">
|
||||||
<span class="logo-default">SAND framework</span>
|
<span class="logo-default">Heberges APP</span>
|
||||||
<span class="logo-dark">SAND framework</span>
|
<span class="logo-dark">Heberges APP</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!--End: Logo-->
|
<!--End: Logo-->
|
||||||
<!-- Search -->
|
|
||||||
<div id="search"><a id="btn-search-close" class="btn-search-close" aria-label="Close search form"><i
|
|
||||||
class="icon-x"></i></a>
|
|
||||||
<form class="search-form" action="#" method="get">
|
|
||||||
<input class="form-control" name="q" type="search" placeholder="Type & Search..."/>
|
|
||||||
<span class="text-muted">Start typing & press "Enter" or "ESC" to close</span>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<!-- end: search -->
|
|
||||||
<!--Header Extras-->
|
|
||||||
<div class="header-extras">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a id="btn-search" href="#"> <i class="icon-search"></i></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<div class="p-dropdown">
|
|
||||||
<a href="#"><i class="icon-globe"></i><span>FR</span></a>
|
|
||||||
<ul class="p-dropdown-content">
|
|
||||||
<li><a href="#">Français</a></li>
|
|
||||||
<li><a href="#">Deutsch</a></li>
|
|
||||||
<li><a href="#">English</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<!--end: Header Extras-->
|
|
||||||
<!--Navigation Resposnive Trigger-->
|
<!--Navigation Resposnive Trigger-->
|
||||||
<div id="mainMenu-trigger">
|
<div id="mainMenu-trigger">
|
||||||
<a class="lines-button x"><span class="lines"></span></a>
|
<a class="lines-button x"><span class="lines"></span></a>
|
||||||
|
@ -87,120 +44,63 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
@if (\MVC\Classe\Session::isRegistered())
|
{{--@if (\MVC\Classe\Session::isRegistered())
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ \MVC\Classe\Url::module_link_rewrite( 'prestashop', ['admin-dev']) }}">E-commerce</a>
|
<a href="{{ \MVC\Classe\Url::module_link_rewrite( 'prestashop', ['admin-dev']) }}">E-commerce</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ \MVC\Classe\Url::module_link_rewrite( 'wordpress', ['wp-admin']) }}">Blog</a>
|
<a href="{{ \MVC\Classe\Url::module_link_rewrite( 'wordpress', ['wp-admin']) }}">Blog</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="{{ \MVC\Classe\Url::module_link_rewrite( 'phplist', ['admin']) }}">Newsletter</a>
|
<li><a href="{{ \MVC\Classe\Url::module_link_rewrite( 'phplist', ['admin']) }}">Newsletter</a>
|
||||||
</li>
|
</li>
|
||||||
@else
|
@else
|
||||||
<li><a href="{{ \MVC\Classe\Url::module_link_rewrite( 'prestashop', ['']) }}">E-commerce</a>
|
<li><a href="{{ \MVC\Classe\Url::module_link_rewrite( 'prestashop', ['']) }}">E-commerce</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="{{ \MVC\Classe\Url::module_link_rewrite( 'wordpress', ['']) }}">Blog</a>
|
<li><a href="{{ \MVC\Classe\Url::module_link_rewrite( 'wordpress', ['']) }}">Blog</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="{{ \MVC\Classe\Url::module_link_rewrite( 'phplist', ['']) }}">Newsletter</a>
|
<li><a href="{{ \MVC\Classe\Url::module_link_rewrite( 'phplist', ['']) }}">Newsletter</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif--}}
|
||||||
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'symfony', []) }}">Symfony
|
</ul>
|
||||||
5.1</a></li>
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--end: Navigation-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<!-- end: Header -->
|
||||||
|
|
||||||
<li class="dropdown"><a
|
<section id="page-content">
|
||||||
href="#">Documentation</a>
|
<div class="container">
|
||||||
{{\MVC\Classe\ControlleurAction::inserer('menudocs.default',[])}}
|
@yield('content')
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
</section>
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!--end: Navigation-->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<!-- end: Header -->
|
|
||||||
|
|
||||||
<section id="page-content">
|
<!-- Footer -->
|
||||||
<div class="container">
|
<footer id="footer">
|
||||||
@yield('content')
|
<div class="footer-content">
|
||||||
</div>
|
<div class="container">
|
||||||
</section>
|
<div class="row">
|
||||||
|
<div class="col-lg-5">
|
||||||
|
<div class="widget">
|
||||||
|
<div class="widget-title">SAND Framework</div>
|
||||||
|
<p class="mb-5">Built with love in Besançon, Doubs, France<br>
|
||||||
|
All rights reserved. Copyright © 2020. Info[ARTS]Media</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="copyright-content">
|
||||||
|
<div class="container">
|
||||||
|
<div class="copyright-text text-center">© 2020 SAND Framework - Responsive FrameWork Template.
|
||||||
|
All Rights Reserved.<a href="http://infoartsmedia.fr" target="_blank"> Info[ARTS]Media</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<!-- end: Footer -->
|
||||||
|
|
||||||
<!-- Footer -->
|
</div>
|
||||||
<footer id="footer">
|
<!-- end: Body Inner -->
|
||||||
<div class="footer-content">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-5">
|
|
||||||
<div class="widget">
|
|
||||||
<div class="widget-title">SAND Framework</div>
|
|
||||||
<p class="mb-5">Built with love in Besançon, Doubs, France<br>
|
|
||||||
All rights reserved. Copyright © 2020. Info[ARTS]Media</p>
|
|
||||||
<a href="#"
|
|
||||||
class="btn btn-inverted">Purchase Now</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-7">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-3">
|
|
||||||
<div class="widget">
|
|
||||||
<div class="widget-title">Discover</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li><a href="#">Features</a></li>
|
|
||||||
<li><a href="#">Layouts</a></li>
|
|
||||||
<li><a href="#">Corporate</a></li>
|
|
||||||
<li><a href="#">Updates</a></li>
|
|
||||||
<li><a href="#">Pricing</a></li>
|
|
||||||
<li><a href="#">Customers</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-3">
|
|
||||||
<div class="widget">
|
|
||||||
<div class="widget-title">Features</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li><a href="#">Layouts</a></li>
|
|
||||||
<li><a href="#">Headers</a></li>
|
|
||||||
<li><a href="#">Widgets</a></li>
|
|
||||||
<li><a href="#">Footers</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-3">
|
|
||||||
<div class="widget">
|
|
||||||
<div class="widget-title">Pages</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li><a href="#">Portfolio</a></li>
|
|
||||||
<li><a href="#">Blog</a></li>
|
|
||||||
<li><a href="#">Shop</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-3">
|
|
||||||
<div class="widget">
|
|
||||||
<div class="widget-title">Support</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li><a href="#">Help Desk</a></li>
|
|
||||||
<li><a href="#">Documentation</a></li>
|
|
||||||
<li><a href="#">Contact Us</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="copyright-content">
|
|
||||||
<div class="container">
|
|
||||||
<div class="copyright-text text-center">© 2020 SAND Framework - Responsive FrameWork Template.
|
|
||||||
All Rights Reserved.<a href="http://infoartsmedia.fr" target="_blank"> Info[ARTS]Media</a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
<!-- end: Footer -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- end: Body Inner -->
|
|
||||||
@endsection
|
@endsection
|
|
@ -1,14 +0,0 @@
|
||||||
@extends('body')
|
|
||||||
|
|
||||||
@section('sidebar')
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('top-javascript')
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
@extends('body')
|
|
||||||
|
|
||||||
@section('sidebar')
|
|
||||||
@parent
|
|
||||||
|
|
||||||
<p>This is appended to the master sidebar.</p>
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<h1>Sign in</h1>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
@foreach ($hybridauth->getProviders() as $name)
|
|
||||||
@if (!isset($adapters[$name]))
|
|
||||||
<li>
|
|
||||||
<a href="{{ \MVC\Classe\Url::link_rewrite(false, 'authentificate', ['provider' => $name]) }}">
|
|
||||||
Sign in with {{ $name }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('top-javascript')
|
|
||||||
@endsection
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
@extends('body')
|
|
||||||
|
|
||||||
@section('sidebar')
|
|
||||||
@parent
|
|
||||||
|
|
||||||
<p>This is appended to the master sidebar.</p>
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<h2 class="section-title" id="donate">Buy me some beers</h2>
|
|
||||||
|
|
||||||
<div class="donate-container">
|
|
||||||
<div class="donate-description">
|
|
||||||
<p>
|
|
||||||
SAND FrameWork is an CC Universal-licensed open source project and completely free to use.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
However, the amount of effort needed to maintain and develop new features for the project is not sustainable
|
|
||||||
without proper financial backing.
|
|
||||||
You can support its ongoing development by being a backer or a sponsor on
|
|
||||||
<a href="https://www.patreon.com/"> Patreon campaign</a>
|
|
||||||
(recurring, with perks for different tiers), and get your company logo here.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Also, you can make a <a href="https://www.paypal.me/">one time donation via PayPal</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="donate-footer">
|
|
||||||
<a href="https://www.patreon.com/" class="beer-button button-ghost">Be a sponsor on Patreon</a>
|
|
||||||
<a href="https://www.paypal.me/" class="beer-button button-secondary">Donate via PayPal</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<img src="assets/img/beer.svg" alt="" class="donate-beer">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
|
@ -1,31 +0,0 @@
|
||||||
@extends('body')
|
|
||||||
|
|
||||||
@section('sidebar')
|
|
||||||
@parent
|
|
||||||
|
|
||||||
<p>This is appended to the master sidebar.</p>
|
|
||||||
<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'authentification', []) }}">Authentification</a>
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<h1>Compte utilisateur</h1>
|
|
||||||
|
|
||||||
@if ($adapters)
|
|
||||||
<h1>You are logged in:</h1>
|
|
||||||
<ul>
|
|
||||||
@foreach ($adapters as $name => $adapter)
|
|
||||||
<li>
|
|
||||||
from <i>{{ $name }}</i>
|
|
||||||
{{ \MVC\Classe\Dumper::dump($adapter->getUserProfile()) }}
|
|
||||||
<!--<span>(<a href="{{ \MVC\Classe\Url::link_rewrite( true, 'authentification-callback-example', ['logout'=>$name ]) }}"
|
|
||||||
">Log Out</a>)</span>-->
|
|
||||||
<span>(<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'logout', ['logout'=>$name ]) }}">Log Out</a>)</span>
|
|
||||||
</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
@extends('body')
|
|
||||||
|
|
||||||
@section('sidebar')
|
|
||||||
@parent
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (isset($files))
|
|
||||||
|
|
||||||
<h1>Sommaire:</h1>
|
|
||||||
|
|
||||||
@foreach( $files as $file)
|
|
||||||
<a href="{{ \MVC\Classe\Url::link_rewrite( false, 'docs', ['file'=>$file]) }}">{{ $file }}</a> <br/>
|
|
||||||
@endforeach
|
|
||||||
@endif
|
|
||||||
@if (isset($data))
|
|
||||||
{{$data}}
|
|
||||||
@endif
|
|
||||||
@endsection
|
|
|
@ -1,16 +0,0 @@
|
||||||
@extends('body')
|
|
||||||
|
|
||||||
@section('sidebar')
|
|
||||||
@parent
|
|
||||||
|
|
||||||
<p>This is appended to the master sidebar.</p>
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
Foo Controlleur
|
|
||||||
@if (isset($id))
|
|
||||||
{{$id}}
|
|
||||||
@else
|
|
||||||
id not exist
|
|
||||||
@endif
|
|
||||||
@endsection
|
|
|
@ -1,8 +0,0 @@
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'docs', []) }}">Summary</a></li>
|
|
||||||
@if (isset($files))
|
|
||||||
@foreach( $files as $file)
|
|
||||||
<li><a href="{{ \MVC\Classe\Url::link_rewrite( false, 'docs', ['file'=>$file]) }}">{{ $file }}</a><li>
|
|
||||||
@endforeach
|
|
||||||
@endif
|
|
||||||
</ul>
|
|
|
@ -1,15 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require OBJETS_PATH.DIRECTORY_SEPARATOR."dns.class.php";
|
|
||||||
|
|
||||||
header("Content-Type: text/plain");
|
header("Content-Type: text/plain");
|
||||||
|
|
||||||
$bdd = new Bdd();
|
$bdd = new Bdd();
|
||||||
$dns = Dns::getDNS($bdd,$url_params['ip']);
|
$dns = \MVC\Domain\Dns::getDNS($bdd,$url_params['ip']);
|
||||||
$alias = array();
|
$alias = array();
|
||||||
$reverseDns = Dns::getReverseDNS($bdd,$url_params['ip']);
|
$reverseDns = \MVC\Domain\Dns::getReverseDNS($bdd,$url_params['ip']);
|
||||||
foreach($reverseDns as $row){
|
foreach($reverseDns as $row){
|
||||||
$tab = Dns::getAliasFromDNS($bdd,$row['valeur2_dns']);
|
$tab = \MVC\Domain\Dns::getAliasFromDNS($bdd,$row['valeur2_dns']);
|
||||||
$alias[] = $tab;
|
$alias[] = $tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require OBJETS_PATH.DIRECTORY_SEPARATOR."host.class.php";
|
|
||||||
|
|
||||||
$path = PATH_URL;
|
$path = PATH_URL;
|
||||||
$bdd = new Bdd();
|
$bdd = new \MVC\Classe\Bdd();
|
||||||
|
|
||||||
Host::addHost($bdd,$_POST['ip'],$_POST['nom']);
|
\MVC\Domain\Host::addHost($bdd,$_POST['ip'],$_POST['nom']);
|
||||||
|
|
||||||
switch($_POST['from']){
|
switch($_POST['from']){
|
||||||
case "vlan-zone+" :
|
case "vlan-zone+" :
|
||||||
|
|
Loading…
Reference in a new issue