update php-cs-fixer
This commit is contained in:
parent
2068ba1fed
commit
46f300f890
140 changed files with 1703 additions and 1251 deletions
|
|
@ -10,7 +10,8 @@ class Application
|
|||
public $route;
|
||||
|
||||
|
||||
public function __construct(){
|
||||
public function __construct()
|
||||
{
|
||||
$this->http = new HttpMethod();
|
||||
$this->browser = new Browser();
|
||||
|
||||
|
|
@ -20,13 +21,13 @@ class Application
|
|||
$this->route = $dispacher->route;
|
||||
}
|
||||
|
||||
public function launch(){
|
||||
public function launch()
|
||||
{
|
||||
//print_r($this->route);
|
||||
$controlleur = new Controlleur($this);
|
||||
//si la page n'est un controlleur d'action alors on affiche l'écran
|
||||
if(!$this->url->page['control']) {
|
||||
if (!$this->url->page['control']) {
|
||||
print($controlleur->vue->ecran);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,8 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
|
||||
class Asynchonous
|
||||
{
|
||||
|
||||
private $_css;
|
||||
private $_javascript;
|
||||
|
||||
|
|
@ -37,5 +35,4 @@ class Asynchonous
|
|||
{
|
||||
echo $this->_javascript;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class Bdd
|
|||
|
||||
public function __construct($bdd = 'bdd1')
|
||||
{
|
||||
switch($bdd) {
|
||||
switch ($bdd) {
|
||||
case 'bdd1':
|
||||
$this->bdd = new \PDO(DSN_BDD1, USER_BDD1, PASS_BDD1);
|
||||
break;
|
||||
|
|
@ -44,11 +44,12 @@ class Bdd
|
|||
* @param array|null $params
|
||||
* @return bool|\PDOStatement
|
||||
*/
|
||||
public function faireBindRequete($sql,Array $params = null){
|
||||
public function faireBindRequete($sql, array $params = null)
|
||||
{
|
||||
$req = $this->bdd->prepare($sql);
|
||||
if($params){
|
||||
if ($params) {
|
||||
foreach ($params as $value) {
|
||||
$req->bindParam($value[0],Caracter::normalise_ChaineDeCaracteres($value[1]),$value[2]);
|
||||
$req->bindParam($value[0], Caracter::normalise_ChaineDeCaracteres($value[1]), $value[2]);
|
||||
}
|
||||
}
|
||||
$req->execute();
|
||||
|
|
@ -56,9 +57,10 @@ class Bdd
|
|||
return $req;
|
||||
}
|
||||
|
||||
public function exploiterResultat($req){
|
||||
public function exploiterResultat($req)
|
||||
{
|
||||
$res = $req->fetchAll();
|
||||
foreach($res as $data) {
|
||||
foreach ($res as $data) {
|
||||
foreach ($data as $key => $row) {
|
||||
if (is_string($row)) {
|
||||
$row = Caracter::normalise_ChaineDeCaracteres($row);
|
||||
|
|
@ -68,4 +70,4 @@ class Bdd
|
|||
}
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,8 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
|
||||
class Browser
|
||||
{
|
||||
|
||||
public $user;
|
||||
public $userAgent;
|
||||
|
||||
|
|
@ -29,43 +27,73 @@ class Browser
|
|||
$t = " " . $t;
|
||||
|
||||
// Humans / Regular Users
|
||||
if (strpos($t, 'opera') || strpos($t, 'opr/')) return 'Opera';
|
||||
elseif (strpos($t, 'edge')) return 'Edge';
|
||||
elseif (strpos($t, 'chrome')) return 'Chrome';
|
||||
elseif (strpos($t, 'safari')) return 'Safari';
|
||||
elseif (strpos($t, 'firefox')) return 'Firefox';
|
||||
elseif (strpos($t, 'msie') || strpos($t, 'trident/7')) return 'Internet Explorer';
|
||||
if (strpos($t, 'opera') || strpos($t, 'opr/')) {
|
||||
return 'Opera';
|
||||
} elseif (strpos($t, 'edge')) {
|
||||
return 'Edge';
|
||||
} elseif (strpos($t, 'chrome')) {
|
||||
return 'Chrome';
|
||||
} elseif (strpos($t, 'safari')) {
|
||||
return 'Safari';
|
||||
} elseif (strpos($t, 'firefox')) {
|
||||
return 'Firefox';
|
||||
} elseif (strpos($t, 'msie') || strpos($t, 'trident/7')) {
|
||||
return 'Internet Explorer';
|
||||
}
|
||||
|
||||
// Application Users
|
||||
elseif (strpos($t, 'curl')) return '[App] Curl';
|
||||
elseif (strpos($t, 'curl')) {
|
||||
return '[App] Curl';
|
||||
}
|
||||
|
||||
// Search Engines
|
||||
elseif (strpos($t, 'google')) return '[Bot] Googlebot';
|
||||
elseif (strpos($t, 'bing')) return '[Bot] Bingbot';
|
||||
elseif (strpos($t, 'slurp')) return '[Bot] Yahoo! Slurp';
|
||||
elseif (strpos($t, 'duckduckgo')) return '[Bot] DuckDuckBot';
|
||||
elseif (strpos($t, 'baidu')) return '[Bot] Baidu';
|
||||
elseif (strpos($t, 'yandex')) return '[Bot] Yandex';
|
||||
elseif (strpos($t, 'sogou')) return '[Bot] Sogou';
|
||||
elseif (strpos($t, 'exabot')) return '[Bot] Exabot';
|
||||
elseif (strpos($t, 'msn')) return '[Bot] MSN';
|
||||
elseif (strpos($t, 'google')) {
|
||||
return '[Bot] Googlebot';
|
||||
} elseif (strpos($t, 'bing')) {
|
||||
return '[Bot] Bingbot';
|
||||
} elseif (strpos($t, 'slurp')) {
|
||||
return '[Bot] Yahoo! Slurp';
|
||||
} elseif (strpos($t, 'duckduckgo')) {
|
||||
return '[Bot] DuckDuckBot';
|
||||
} elseif (strpos($t, 'baidu')) {
|
||||
return '[Bot] Baidu';
|
||||
} elseif (strpos($t, 'yandex')) {
|
||||
return '[Bot] Yandex';
|
||||
} elseif (strpos($t, 'sogou')) {
|
||||
return '[Bot] Sogou';
|
||||
} elseif (strpos($t, 'exabot')) {
|
||||
return '[Bot] Exabot';
|
||||
} elseif (strpos($t, 'msn')) {
|
||||
return '[Bot] MSN';
|
||||
}
|
||||
|
||||
// Common Tools and Bots
|
||||
elseif (strpos($t, 'mj12bot')) return '[Bot] Majestic';
|
||||
elseif (strpos($t, 'ahrefs')) return '[Bot] Ahrefs';
|
||||
elseif (strpos($t, 'semrush')) return '[Bot] SEMRush';
|
||||
elseif (strpos($t, 'rogerbot') || strpos($t, 'dotbot')) return '[Bot] Moz or OpenSiteExplorer';
|
||||
elseif (strpos($t, 'frog') || strpos($t, 'screaming')) return '[Bot] Screaming Frog';
|
||||
elseif (strpos($t, 'mj12bot')) {
|
||||
return '[Bot] Majestic';
|
||||
} elseif (strpos($t, 'ahrefs')) {
|
||||
return '[Bot] Ahrefs';
|
||||
} elseif (strpos($t, 'semrush')) {
|
||||
return '[Bot] SEMRush';
|
||||
} elseif (strpos($t, 'rogerbot') || strpos($t, 'dotbot')) {
|
||||
return '[Bot] Moz or OpenSiteExplorer';
|
||||
} elseif (strpos($t, 'frog') || strpos($t, 'screaming')) {
|
||||
return '[Bot] Screaming Frog';
|
||||
}
|
||||
|
||||
// Miscellaneous
|
||||
elseif (strpos($t, 'facebook')) return '[Bot] Facebook';
|
||||
elseif (strpos($t, 'pinterest')) return '[Bot] Pinterest';
|
||||
elseif (strpos($t, 'facebook')) {
|
||||
return '[Bot] Facebook';
|
||||
} elseif (strpos($t, 'pinterest')) {
|
||||
return '[Bot] Pinterest';
|
||||
}
|
||||
|
||||
// Check for strings commonly used in bot user agents
|
||||
elseif (strpos($t, 'crawler') || strpos($t, 'api') ||
|
||||
strpos($t, 'spider') || strpos($t, 'http') ||
|
||||
strpos($t, 'bot') || strpos($t, 'archive') ||
|
||||
strpos($t, 'info') || strpos($t, 'data')) return '[Bot] Other';
|
||||
strpos($t, 'info') || strpos($t, 'data')) {
|
||||
return '[Bot] Other';
|
||||
}
|
||||
|
||||
return 'Other (Unknown)';
|
||||
}
|
||||
|
|
@ -90,4 +118,4 @@ class Browser
|
|||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
|
||||
use ForceUTF8\Encoding;
|
||||
|
||||
class Caracter
|
||||
{
|
||||
|
||||
public static function normalise_ChaineDeCaracteres($chaine)
|
||||
{
|
||||
return Encoding::fixUTF8(Caracter::fp_stripslashes($chaine));
|
||||
|
|
@ -76,4 +74,4 @@ class Caracter
|
|||
$chaine = str_replace('"', '"', $chaine);
|
||||
return $chaine;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
class Controlleur{
|
||||
|
||||
public $modele;
|
||||
public $vue;
|
||||
|
||||
public function __construct($application){
|
||||
|
||||
class Controlleur
|
||||
{
|
||||
public $modele;
|
||||
public $vue;
|
||||
|
||||
public function __construct($application)
|
||||
{
|
||||
switch ($application->http->method) {
|
||||
//cas des requètes PUT et DELETE
|
||||
case 'PUT':
|
||||
|
|
@ -20,8 +20,9 @@ class Controlleur{
|
|||
$this->callHttpResponse($application);
|
||||
die();
|
||||
}
|
||||
// no break
|
||||
default:
|
||||
if ($application->route != NULL) {
|
||||
if ($application->route != null) {
|
||||
$conduit = explode('::', $application->route['controller']);
|
||||
require CONDUIT_PATH . DIRECTORY_SEPARATOR . $conduit[0] . '.php';
|
||||
$conduitRoute = "\\" . $conduit[0];
|
||||
|
|
@ -30,8 +31,7 @@ class Controlleur{
|
|||
$class->initialize($application->route);
|
||||
$this->vue = new VueVide();
|
||||
$this->vue->ecran = $class->$method();
|
||||
|
||||
} else if ($application->url->page['control']) {
|
||||
} elseif ($application->url->page['control']) {
|
||||
$url_params = $application->url->page['params'];
|
||||
require TRAITEMENT_PATH . DIRECTORY_SEPARATOR . $application->url->page['name'] . '.php';
|
||||
} else {
|
||||
|
|
@ -39,9 +39,7 @@ class Controlleur{
|
|||
$this->vue = new Vue($this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function callHttpResponse($application)
|
||||
{
|
||||
|
|
@ -56,11 +54,10 @@ class Controlleur{
|
|||
$reponse->instanciate($application->url, $application->http->getData());
|
||||
$method = strtolower($application->http->method);
|
||||
|
||||
Logger::addLog('http11'," $reponseHttp app {$application->http->method} request! ( ".get_class($reponse)."->$method() )");
|
||||
Logger::addLog('http11', " $reponseHttp app {$application->http->method} request! ( ".get_class($reponse)."->$method() )");
|
||||
|
||||
$this->vue = new VueVide();
|
||||
$this->vue->ecran = $reponse->$method();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,8 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
|
||||
class ControlleurAction
|
||||
{
|
||||
|
||||
public static function inserer($action, $data = array())
|
||||
{
|
||||
$action = explode('.', $action);
|
||||
|
|
@ -21,13 +19,8 @@ class ControlleurAction
|
|||
} else {
|
||||
return $slot->default($data);
|
||||
}
|
||||
|
||||
} else {
|
||||
/*HandleError*/
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,10 +9,8 @@ use Symfony\Component\Routing\RequestContext as RequestContext;
|
|||
use Symfony\Component\Routing\Loader\YamlFileLoader as YamlFileLoader;
|
||||
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
||||
|
||||
|
||||
class Dispacher
|
||||
{
|
||||
|
||||
public $route;
|
||||
|
||||
public function __construct()
|
||||
|
|
@ -20,7 +18,7 @@ class Dispacher
|
|||
|
||||
//Avoid callback from empty homepage
|
||||
if ($_SERVER['REQUEST_URI'] == '/' || $_SERVER['REQUEST_URI'] == '') {
|
||||
$this->route = NULL;
|
||||
$this->route = null;
|
||||
} else {
|
||||
//Test the route from config file
|
||||
try {
|
||||
|
|
@ -38,8 +36,8 @@ class Dispacher
|
|||
|
||||
$this->route = $parameters;
|
||||
} catch (ResourceNotFoundException $e) {
|
||||
$this->route = NULL;
|
||||
$this->route = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
|
||||
class Dumper{
|
||||
|
||||
public static function dump($var){
|
||||
class Dumper
|
||||
{
|
||||
public static function dump($var)
|
||||
{
|
||||
echo "<pre>";
|
||||
if (is_bool($var)) {
|
||||
echo ($var) ? "true" : "false";
|
||||
|
|
@ -21,7 +21,6 @@ class Dumper{
|
|||
*/
|
||||
public static function setPHPvalues()
|
||||
{
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
ini_set('memory_limit', -1);
|
||||
|
|
@ -32,4 +31,4 @@ class Dumper{
|
|||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,17 +3,15 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
|
||||
class HttpMethod
|
||||
{
|
||||
|
||||
public $method;
|
||||
protected $data;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->method = $_SERVER['REQUEST_METHOD'];
|
||||
Logger::addLog('http.method',$this->method);
|
||||
Logger::addLog('http.method', $this->method);
|
||||
$this->acceptResponse();
|
||||
}
|
||||
|
||||
|
|
@ -28,6 +26,7 @@ class HttpMethod
|
|||
//$this->data['GET'] = ...
|
||||
//POST DATA except enctype="multipart/form-data"
|
||||
$this->data = json_decode(file_get_contents("php://input"), true);
|
||||
// no break
|
||||
case 'DELETE':
|
||||
//$this->data['GET'] = ...
|
||||
//POST DATA except enctype="multipart/form-data"
|
||||
|
|
@ -44,5 +43,4 @@ class HttpMethod
|
|||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
|
||||
/**
|
||||
* Class Response
|
||||
*
|
||||
|
|
@ -165,8 +164,6 @@ class HttpMethodRequete
|
|||
|
||||
/** Pour utiliser ce code il faut mettre la variable safe_mode a ON dans php.ini */
|
||||
//exec($curl_cmd);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -218,5 +215,4 @@ class HttpMethodRequete
|
|||
{
|
||||
return $this->replaceContext('DELETE')->addContent($params)->send();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,10 @@
|
|||
|
||||
namespace MVC\Classe\Implement;
|
||||
|
||||
|
||||
|
||||
class Action
|
||||
{
|
||||
public function render($view, $data)
|
||||
{
|
||||
|
||||
|
||||
$paths = new \SplPriorityQueue;
|
||||
|
||||
$paths->insert(VIEW_PATH . DIRECTORY_SEPARATOR . "system", 100);
|
||||
|
|
@ -20,6 +16,5 @@ class Action
|
|||
$renderer = new \Windwalker\Renderer\BladeRenderer($paths, array('cache_path' => VIEW_PATH . DIRECTORY_SEPARATOR . "cache"));
|
||||
|
||||
return $renderer->render($view, $data);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,12 @@
|
|||
|
||||
namespace MVC\Classe\Implement;
|
||||
|
||||
|
||||
class Conduit extends Action
|
||||
{
|
||||
public function initialize($var)
|
||||
{
|
||||
//Export variable from conduit
|
||||
foreach ($var as $key => $value) {
|
||||
|
||||
if ($key != "controller") {
|
||||
if ($key != "_route") {
|
||||
$this->$key = $value;
|
||||
|
|
@ -19,4 +17,4 @@ class Conduit extends Action
|
|||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@ interface HttpReponseInterface
|
|||
public function put();
|
||||
|
||||
public function delete();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ interface RestReponseInterface
|
|||
public function put();
|
||||
|
||||
public function delete();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use MVC\Classe\Implement\Contrat\HttpReponseInterface;
|
|||
|
||||
class HttpReponse extends Action implements HttpReponseInterface
|
||||
{
|
||||
|
||||
public $url;
|
||||
public $params;
|
||||
public $data;
|
||||
|
|
@ -35,12 +34,9 @@ class HttpReponse extends Action implements HttpReponseInterface
|
|||
|
||||
public function put()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ use MVC\Classe\Implement\Contrat\RestReponseInterface;
|
|||
|
||||
class RestReponse implements RestReponseInterface
|
||||
{
|
||||
|
||||
public $url;
|
||||
public $params;
|
||||
public $data;
|
||||
|
|
@ -38,21 +37,17 @@ class RestReponse implements RestReponseInterface
|
|||
|
||||
public function get()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function post()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function put()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,11 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
|
||||
use Symfony\Component\Validator\Constraints\Date;
|
||||
|
||||
class Logger
|
||||
{
|
||||
|
||||
static function addLog($type = 'default', $what = "")
|
||||
public static function addLog($type = 'default', $what = "")
|
||||
{
|
||||
$file = LOG_PATH . DIRECTORY_SEPARATOR . 'app.' . $type . '.log';
|
||||
$browser = new Browser();
|
||||
|
|
@ -41,5 +39,4 @@ class Logger
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
class Modele{
|
||||
|
||||
public $page;
|
||||
|
||||
public function __construct($base_param){
|
||||
|
||||
if(file_exists(MODELS_PATH.DIRECTORY_SEPARATOR.$base_param['name'].'.model')){
|
||||
$fichier = file(MODELS_PATH.DIRECTORY_SEPARATOR.$base_param['name'].'.model');
|
||||
foreach ($fichier as $ligne_num => $ligne) {
|
||||
class Modele
|
||||
{
|
||||
public $page;
|
||||
|
||||
public function __construct($base_param)
|
||||
{
|
||||
if (file_exists(MODELS_PATH.DIRECTORY_SEPARATOR.$base_param['name'].'.model')) {
|
||||
$fichier = file(MODELS_PATH.DIRECTORY_SEPARATOR.$base_param['name'].'.model');
|
||||
foreach ($fichier as $ligne_num => $ligne) {
|
||||
//on recherche le pattern des parametres
|
||||
if (preg_match("#[ ]*([a-zA-Z_+]*)[ ]*[:][ ]*([a-zA-Z0-9-_+'\{\,\ \}\(\)]*[ ]*)#", $ligne, $matches)) {
|
||||
//on recherche le pattern des tableau dans la valeur du paramètre
|
||||
|
|
@ -28,14 +28,12 @@ class Modele{
|
|||
}
|
||||
$this->page[$matches[1]] = $matches[2];
|
||||
}
|
||||
|
||||
}
|
||||
$this->page['url_params'] = $base_param['params'];
|
||||
}else{
|
||||
$this->page['name'] = $base_param['name'];
|
||||
$this->page['description'] = $base_param['description'];
|
||||
$this->page['params'] = $base_param['params'];
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->page['name'] = $base_param['name'];
|
||||
$this->page['description'] = $base_param['description'];
|
||||
$this->page['params'] = $base_param['params'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
class Modular{
|
||||
|
||||
class Modular
|
||||
{
|
||||
private $app = "";
|
||||
private $subapp_dir = "";
|
||||
private $subfile = "index.php";
|
||||
|
||||
public function __construct($appName,$type = 'symfony',$options = array()){
|
||||
public function __construct($appName, $type = 'symfony', $options = array())
|
||||
{
|
||||
|
||||
//Dumper::dump($options);die();
|
||||
|
||||
|
|
@ -17,18 +18,18 @@ class Modular{
|
|||
case "symfony":
|
||||
break;
|
||||
case "wordpress":
|
||||
if(isset($options[0])) {
|
||||
if (isset($options[0])) {
|
||||
switch ($options[0]) {
|
||||
case 'wp-admin':
|
||||
$this->subapp_dir = DIRECTORY_SEPARATOR . $options[0];
|
||||
if(isset($options[1])) {
|
||||
if (isset($options[1])) {
|
||||
switch ($options[1]) {
|
||||
case 'setup-config.php':
|
||||
case 'install.php':
|
||||
$this->subfile = $options[1];
|
||||
break;
|
||||
default:
|
||||
if(preg_match('#(.)*\.php#',$options[1])){
|
||||
if (preg_match('#(.)*\.php#', $options[1])) {
|
||||
$this->subfile = $options[1];
|
||||
}
|
||||
}
|
||||
|
|
@ -42,7 +43,7 @@ class Modular{
|
|||
}
|
||||
break;
|
||||
case "prestashop":
|
||||
if(isset($options[0])) {
|
||||
if (isset($options[0])) {
|
||||
switch ($options[0]) {
|
||||
case 'admin-dev':
|
||||
case 'install-dev':
|
||||
|
|
@ -53,20 +54,20 @@ class Modular{
|
|||
}
|
||||
break;
|
||||
case "phplist":
|
||||
if(isset($options[0])) {
|
||||
if (isset($options[0])) {
|
||||
switch ($options[0]) {
|
||||
case 'admin':
|
||||
$this->subapp_dir = DIRECTORY_SEPARATOR . 'public_html' . DIRECTORY_SEPARATOR . 'lists'. DIRECTORY_SEPARATOR . $options[0] ;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$this->subapp_dir = DIRECTORY_SEPARATOR . 'public_html' . DIRECTORY_SEPARATOR . 'lists';
|
||||
}
|
||||
break;
|
||||
case "wanewsletter":
|
||||
$this->subfile = "install.php";
|
||||
if(isset($options[0])) {
|
||||
if (isset($options[0])) {
|
||||
switch ($options[0]) {
|
||||
case 'admin':
|
||||
$this->subapp_dir = DIRECTORY_SEPARATOR . $options[0] ;
|
||||
|
|
@ -82,11 +83,13 @@ class Modular{
|
|||
}
|
||||
}
|
||||
|
||||
public function getAppName(){
|
||||
public function getAppName()
|
||||
{
|
||||
return $this->app;
|
||||
}
|
||||
|
||||
public function load($type = "symfony"){
|
||||
public function load($type = "symfony")
|
||||
{
|
||||
switch ($type) {
|
||||
case "symfony":
|
||||
require MODULES_PATH . DIRECTORY_SEPARATOR . $this->getAppName() . DIRECTORY_SEPARATOR . "public" . DIRECTORY_SEPARATOR . "index.php";
|
||||
|
|
@ -108,4 +111,4 @@ class Modular{
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,28 +2,29 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
class ModularRegister{
|
||||
|
||||
class ModularRegister
|
||||
{
|
||||
public $registry = array();
|
||||
public $index = array();
|
||||
|
||||
public function __construct(){
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$fichier = file(MODULES_PATH . DIRECTORY_SEPARATOR . "setup" . DIRECTORY_SEPARATOR ."registre.model");
|
||||
foreach ($fichier as $ligne_num => $ligne) {
|
||||
if (preg_match("#([ ]*[a-zA-Z0-9-_+éèàùïîç]*)[ ]*[:][ ]*([0-9a-zA-Z-_+ 'éèàùïîç.]*[ ]*)#", $ligne, $matches)) {
|
||||
|
||||
$this->registry[$matches[1]] = $matches[2];
|
||||
$this->index[] = $matches[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getRegistre(){
|
||||
public function getRegistre()
|
||||
{
|
||||
return $this->registry;
|
||||
}
|
||||
|
||||
public function getIndex(){
|
||||
public function getIndex()
|
||||
{
|
||||
return $this->index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,64 +3,62 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
|
||||
class Session
|
||||
{
|
||||
|
||||
static public function start()
|
||||
public static function start()
|
||||
{
|
||||
session_start();
|
||||
return;
|
||||
}
|
||||
static public function destroy()
|
||||
public static function destroy()
|
||||
{
|
||||
session_destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
static public function setUserProfile($userProfile)
|
||||
public static function setUserProfile($userProfile)
|
||||
{
|
||||
$_SESSION['userProfile'] = $userProfile;
|
||||
return;
|
||||
}
|
||||
static public function setId($id)
|
||||
public static function setId($id)
|
||||
{
|
||||
$_SESSION['id'] = $id;
|
||||
return;
|
||||
}
|
||||
static public function setUserName($username)
|
||||
public static function setUserName($username)
|
||||
{
|
||||
$_SESSION['username'] = $username;
|
||||
return;
|
||||
}
|
||||
|
||||
static public function setToken($token)
|
||||
public static function setToken($token)
|
||||
{
|
||||
$_SESSION['userToken'] = $token;
|
||||
return;
|
||||
}
|
||||
|
||||
static public function setStorage($hybriauthStorage)
|
||||
public static function setStorage($hybriauthStorage)
|
||||
{
|
||||
$_SESSION['storage'] = $hybriauthStorage;
|
||||
return;
|
||||
}
|
||||
static public function getStorage()
|
||||
public static function getStorage()
|
||||
{
|
||||
return $_SESSION['storage'] ;
|
||||
}
|
||||
|
||||
static public function setHybridAuth($hybriauth)
|
||||
public static function setHybridAuth($hybriauth)
|
||||
{
|
||||
$_SESSION['auth'] = $hybriauth;
|
||||
return;
|
||||
}
|
||||
static public function getHybridAuth()
|
||||
public static function getHybridAuth()
|
||||
{
|
||||
return $_SESSION['auth'] ;
|
||||
}
|
||||
|
||||
static public function isRegistered()
|
||||
public static function isRegistered()
|
||||
{
|
||||
if (isset($_SESSION['userProfile'])) {
|
||||
return true;
|
||||
|
|
@ -69,7 +67,7 @@ class Session
|
|||
}
|
||||
}
|
||||
|
||||
static public function redirectIfNotRegistered()
|
||||
public static function redirectIfNotRegistered()
|
||||
{
|
||||
if (isset($_SESSION['userProfile'])) {
|
||||
return ;
|
||||
|
|
@ -78,5 +76,4 @@ class Session
|
|||
die('Ooops, something was wrong...');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
class Tri{
|
||||
|
||||
public static function cmp($a,$b){
|
||||
class Tri
|
||||
{
|
||||
public static function cmp($a, $b)
|
||||
{
|
||||
if ($a == $b) {
|
||||
return 0;
|
||||
}
|
||||
return ($a < $b) ? -1 : 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,37 +26,36 @@ class Url
|
|||
|
||||
|
||||
$url = parse_url($_SERVER['REQUEST_URI']);
|
||||
$urlTrim = trim( $url['path'] , '/' );
|
||||
$urlParts = explode('/' , $urlTrim );
|
||||
$urlTrim = trim($url['path'], '/');
|
||||
$urlParts = explode('/', $urlTrim);
|
||||
|
||||
//print_r($urlParts);
|
||||
if(isset($urlParts[0])) {
|
||||
if (isset($urlParts[0])) {
|
||||
//Récupération du nom de la page
|
||||
($urlParts[0] == 'index' || $urlParts[0] == '') ? $page['name'] = 'index' : $page['name'] = $urlParts[0];
|
||||
unset($urlParts[0]);
|
||||
}else{
|
||||
} else {
|
||||
$page['name'] = 'index';
|
||||
}
|
||||
|
||||
//il se peut que l'on ait des variable avec ? dans l'url
|
||||
$urlQuery = explode('?' , $page['name'] );
|
||||
$urlQuery = explode('?', $page['name']);
|
||||
$page['name'] = $urlQuery[0];
|
||||
|
||||
$page['name'] = strtolower($page['name']);
|
||||
|
||||
if($page['name'] == 'control'){
|
||||
if ($page['name'] == 'control') {
|
||||
$page['control'] = true;
|
||||
($urlParts[1] == 'index' || $urlParts[1] == '' ) ? $page['name']='index' : $page['name']=$urlParts[1];
|
||||
($urlParts[1] == 'index' || $urlParts[1] == '') ? $page['name']='index' : $page['name']=$urlParts[1];
|
||||
unset($urlParts[1]);
|
||||
|
||||
}
|
||||
|
||||
//vérification du nombre de parametres:
|
||||
$numParts = count($urlParts);
|
||||
//s'il n'existe pas autant de clé que de valeurs, ce peut ^etre un module symfony
|
||||
if ( $numParts%2 != 0 ) {
|
||||
if ($numParts%2 != 0) {
|
||||
//si un module symfony n'est pas reférencé avec le nom de la page, on renvoi un erreur
|
||||
if( !in_array($page['name'], $this->registre->getIndex()) ){
|
||||
if (!in_array($page['name'], $this->registre->getIndex())) {
|
||||
$page['name'] = 'error';
|
||||
$page['params'] = array();
|
||||
$this->page = $page;
|
||||
|
|
@ -70,9 +69,9 @@ class Url
|
|||
}
|
||||
|
||||
//cas d'utilisation normal : il existe autant de clé que de valeurs
|
||||
} else if ( $numParts != 0 ) {
|
||||
} elseif ($numParts != 0) {
|
||||
// si c'est un module alors on charge un a un les parametres
|
||||
if( in_array($page['name'], $this->registre->getIndex()) ){
|
||||
if (in_array($page['name'], $this->registre->getIndex())) {
|
||||
foreach ($urlParts as $key => $value) {
|
||||
$values[] = $value;
|
||||
$keys[] = $key;
|
||||
|
|
@ -99,9 +98,9 @@ class Url
|
|||
$page['name'] = lcfirst($page['name']);
|
||||
$pageFile = CONTROLLERS_PATH . DIRECTORY_SEPARATOR . $page['name'] . '.php';
|
||||
//verification de l'existence de la page dans les controlleurs
|
||||
if($page['control']){
|
||||
if ($page['control']) {
|
||||
$pageFile = TRAITEMENT_PATH . DIRECTORY_SEPARATOR . $page['name'] . '.php';
|
||||
}else {
|
||||
} else {
|
||||
//recherche du fichier controlleur correpondant HTTP1.1 ou HTTP1.0
|
||||
switch ($method) {
|
||||
//cas des requètes HTTP1.1
|
||||
|
|
@ -132,10 +131,9 @@ class Url
|
|||
}
|
||||
$this->page = $page;
|
||||
$this->pageFile = $pageFile;
|
||||
|
||||
}
|
||||
|
||||
static public function link_rewrite($isControlPatern, $page, $params = array())
|
||||
public static function link_rewrite($isControlPatern, $page, $params = array())
|
||||
{
|
||||
if ($isControlPatern) {
|
||||
return self::controlLink_rewrite($page, $params);
|
||||
|
|
@ -144,7 +142,7 @@ class Url
|
|||
}
|
||||
}
|
||||
|
||||
static public function module_link_rewrite($page, $params = array())
|
||||
public static function module_link_rewrite($page, $params = array())
|
||||
{
|
||||
$stringParams = '';
|
||||
foreach ($params as $values) {
|
||||
|
|
@ -153,17 +151,16 @@ class Url
|
|||
return '/' . $page . $stringParams;
|
||||
}
|
||||
|
||||
static private function link_rewrite_slashParam($page, $params = array())
|
||||
private static function link_rewrite_slashParam($page, $params = array())
|
||||
{
|
||||
$stringParams = '';
|
||||
foreach ($params as $key => $values) {
|
||||
$stringParams .= "/" . $key . "/" . $values;
|
||||
}
|
||||
return '/' . $page . $stringParams;
|
||||
|
||||
}
|
||||
|
||||
static private function controlLink_rewrite($page, $params = array())
|
||||
private static function controlLink_rewrite($page, $params = array())
|
||||
{
|
||||
$stringParams = '';
|
||||
foreach ($params as $key => $values) {
|
||||
|
|
@ -172,7 +169,7 @@ class Url
|
|||
return '/' . 'control' . '/' . $page . $stringParams;
|
||||
}
|
||||
|
||||
static public function absolute_link_rewrite($isControlPatern, $page, $params = array())
|
||||
public static function absolute_link_rewrite($isControlPatern, $page, $params = array())
|
||||
{
|
||||
$url = $_SERVER['HTTP_HOST'];
|
||||
if ($isControlPatern) {
|
||||
|
|
@ -187,7 +184,5 @@ class Url
|
|||
}
|
||||
|
||||
return ($scheme . "://" . $url . $uri);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,25 +2,25 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
class Vue{
|
||||
|
||||
public $ecran;
|
||||
public $block_body;
|
||||
|
||||
public function __construct($application){
|
||||
|
||||
class Vue
|
||||
{
|
||||
public $ecran;
|
||||
public $block_body;
|
||||
|
||||
public function __construct($application)
|
||||
{
|
||||
$templateData = array();
|
||||
extract( $application->modele->page );
|
||||
extract($application->modele->page);
|
||||
|
||||
ob_start();
|
||||
if(file_exists(VIEW_PATH.DIRECTORY_SEPARATOR."view".DIRECTORY_SEPARATOR.$name.".blade.php")) {
|
||||
ob_start();
|
||||
if (file_exists(VIEW_PATH.DIRECTORY_SEPARATOR."view".DIRECTORY_SEPARATOR.$name.".blade.php")) {
|
||||
|
||||
//l'inclusion du controlleur doit renvoyer le tableau $templateData
|
||||
require CONTROLLER_PATH . DIRECTORY_SEPARATOR . $name . '.php';
|
||||
|
||||
|
||||
|
||||
//TEMPLATING BLADE
|
||||
//TEMPLATING BLADE
|
||||
$paths = new \SplPriorityQueue;
|
||||
|
||||
$paths->insert(VIEW_PATH . DIRECTORY_SEPARATOR . "system", 100);
|
||||
|
|
@ -34,12 +34,9 @@ class Vue{
|
|||
$templateData[$key] = $value;
|
||||
}
|
||||
echo $renderer->render($name, $templateData);
|
||||
|
||||
}else{
|
||||
} else {
|
||||
include CONTROLLER_PATH . DIRECTORY_SEPARATOR . $name . '.php';
|
||||
}
|
||||
$this->ecran = ob_get_clean();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,14 +2,11 @@
|
|||
|
||||
namespace MVC\Classe;
|
||||
|
||||
|
||||
class VueVide
|
||||
{
|
||||
|
||||
public $ecran;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ define("CONDUIT_PATH", APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRE
|
|||
define("CONTROLLERS_PATH", APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "controlleurs");
|
||||
define("CONFIG_PATH", APPLICATION_PATH . DIRECTORY_SEPARATOR . "config");
|
||||
define("LOG_PATH", APPLICATION_PATH . DIRECTORY_SEPARATOR . "logs");
|
||||
define("LAYOUT_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "layout");
|
||||
define("LAYOUT_PATH", APPLICATION_PATH . DIRECTORY_SEPARATOR . "layout");
|
||||
define("ACTION_PATH", APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "actions");
|
||||
define("MODELS_PATH", APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "modeles");
|
||||
define("VIEW_PATH", APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "vues");
|
||||
|
|
@ -13,4 +13,4 @@ define("CONTROLLER_PATH", APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . D
|
|||
define("TRAITEMENT_PATH", APPLICATION_PATH . DIRECTORY_SEPARATOR . "traitements");
|
||||
define("PUBLIC_PATH", dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "public");
|
||||
define("CONSOLE_PATH", dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "console");
|
||||
define("DATA_PATH", dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "data");
|
||||
define("DATA_PATH", dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "data");
|
||||
|
|
|
|||
|
|
@ -55,14 +55,13 @@ class DefaultAction extends Action
|
|||
|
||||
public function makeHttp11($data)
|
||||
{
|
||||
|
||||
$data = array('myval' => 25);
|
||||
//Dumper::dump($data);
|
||||
\MVC\Classe\Logger::addLog('action','http11 make request');
|
||||
\MVC\Classe\Logger::addLog('action', 'http11 make request');
|
||||
$request = new HttpMethodRequete();
|
||||
$request->setUrl(Url::absolute_link_rewrite(false,'accueil',['var10'=>'val10']))->get($data);
|
||||
$request->setUrl(Url::absolute_link_rewrite(false,'accueil',['var10'=>'val10']))->post($data);
|
||||
$request->setUrl(Url::absolute_link_rewrite(false, 'accueil', ['var10'=>'val10']))->get($data);
|
||||
$request->setUrl(Url::absolute_link_rewrite(false, 'accueil', ['var10'=>'val10']))->post($data);
|
||||
$request->setUrl(Url::absolute_link_rewrite(false, 'accueil', ['var10' => 'val10']))->put($data);
|
||||
$request->setUrl(Url::absolute_link_rewrite(false,'accueil',['var10'=>'val10']))->delete($data);
|
||||
$request->setUrl(Url::absolute_link_rewrite(false, 'accueil', ['var10'=>'val10']))->delete($data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,5 @@ class FooConduit extends Conduit
|
|||
{
|
||||
echo "load of foo";
|
||||
return $this->render('foo', array('page_title' => 'Foo', 'description' => 'FooConduit', 'id' => $this->id));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,4 @@ class IndexConduit extends Conduit
|
|||
echo "IndexControlleur";
|
||||
return $this->render('index', array("templating_a"=>'blade',"templating_b"=>'twig',"templating_c"=>'edge'));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use MVC\Classe\Logger;
|
|||
|
||||
//Dumper::dump($_SESSION);
|
||||
|
||||
\MVC\Classe\ControlleurAction::inserer('default.makeHttp11',[]);
|
||||
\MVC\Classe\ControlleurAction::inserer('default.makeHttp11', []);
|
||||
|
||||
$templateData = array("templating_a"=>'blade',"templating_b"=>'twig',"templating_c"=>'edge');
|
||||
Logger::addLog('ok', 'Hello world');
|
||||
Logger::addLog('ok', 'Hello world');
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ define('DSN_BDD_DEFAULT', "mysql:host=localhost;dbname=default");
|
|||
define('USER_BDD_DEFAULT', "user_default");
|
||||
define('PASS_BDD_DEFAULT', "pass_default");
|
||||
|
||||
define('DSN_BDD1',"mysql:host=localhost;dbname=db1");
|
||||
define('USER_BDD1',"user1");
|
||||
define('PASS_BDD1',"pass1");
|
||||
define('DSN_BDD1', "mysql:host=localhost;dbname=db1");
|
||||
define('USER_BDD1', "user1");
|
||||
define('PASS_BDD1', "pass1");
|
||||
|
||||
define('DSN_BDD2',"mysql:host=localhost;dbname=db2");
|
||||
define('USER_BDD2',"user2");
|
||||
define('PASS_BDD2',"pass2");
|
||||
define('DSN_BDD2', "mysql:host=localhost;dbname=db2");
|
||||
define('USER_BDD2', "user2");
|
||||
define('PASS_BDD2', "pass2");
|
||||
|
||||
define('PATH_URL',$_SERVER['REQUEST_SCHEME'] . "://www.sand-framework.infoartsmedia.org");
|
||||
define('PATH_URL', $_SERVER['REQUEST_SCHEME'] . "://www.sand-framework.infoartsmedia.org");
|
||||
|
|
|
|||
|
|
@ -3,34 +3,34 @@
|
|||
header("Content-Type: text/plain");
|
||||
|
||||
$bdd = new Bdd();
|
||||
$dns = \MVC\Domain\Dns::getDNS($bdd,$url_params['ip']);
|
||||
$dns = \MVC\Domain\Dns::getDNS($bdd, $url_params['ip']);
|
||||
$alias = array();
|
||||
$reverseDns = \MVC\Domain\Dns::getReverseDNS($bdd,$url_params['ip']);
|
||||
foreach($reverseDns as $row){
|
||||
$tab = \MVC\Domain\Dns::getAliasFromDNS($bdd,$row['valeur2_dns']);
|
||||
$reverseDns = \MVC\Domain\Dns::getReverseDNS($bdd, $url_params['ip']);
|
||||
foreach ($reverseDns as $row) {
|
||||
$tab = \MVC\Domain\Dns::getAliasFromDNS($bdd, $row['valeur2_dns']);
|
||||
$alias[] = $tab;
|
||||
}
|
||||
|
||||
//Affichage
|
||||
echo "<h3>DNS : </h3><br />";
|
||||
foreach($dns as $row){
|
||||
foreach ($dns as $row) {
|
||||
echo $row['valeur1_dns'];
|
||||
echo "<br/>";
|
||||
}
|
||||
echo "<br />";
|
||||
echo "<h3>Reverse DNS : </h3><br />";
|
||||
foreach($reverseDns as $row){
|
||||
foreach ($reverseDns as $row) {
|
||||
echo $row['valeur2_dns'];
|
||||
echo "<br/>";
|
||||
}
|
||||
echo "<br />";
|
||||
echo "<h3>Alias : </h3><br />";
|
||||
|
||||
if(isset($alias[0][0]['valeur1_dns'])) {
|
||||
foreach($alias as $rAlias){
|
||||
if (isset($alias[0][0]['valeur1_dns'])) {
|
||||
foreach ($alias as $rAlias) {
|
||||
foreach ($rAlias as $row) {
|
||||
echo $row['valeur1_dns'];
|
||||
echo "<br/>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,17 +3,17 @@
|
|||
$path = PATH_URL;
|
||||
$bdd = new \MVC\Classe\Bdd();
|
||||
|
||||
\MVC\Domain\Host::addHost($bdd,$_POST['ip'],$_POST['nom']);
|
||||
\MVC\Domain\Host::addHost($bdd, $_POST['ip'], $_POST['nom']);
|
||||
|
||||
switch($_POST['from']){
|
||||
case "vlan-zone+" :
|
||||
case "vlan-zone" :
|
||||
switch ($_POST['from']) {
|
||||
case "vlan-zone+":
|
||||
case "vlan-zone":
|
||||
header("Location: $path{$_POST['from']}/vlan/{$_POST['vlan']}/alert/2/host/{$_POST['ip']}");
|
||||
break;
|
||||
case "ip-zone+" :
|
||||
case "ip-zone" :
|
||||
case "ip-zone+":
|
||||
case "ip-zone":
|
||||
header("Location: $path{$_POST['from']}/motif-ip/{$_POST['motif-ip']}/alert/2/host/{$_POST['ip']}");
|
||||
break;
|
||||
default:
|
||||
header("Location: $path");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue