public static function getLocalConnexion(array $config, \lib\Application $app) { $user = $app->user(); $fs = new localfs\LocalFs(); if ($user->isLogged()) { $fs->setAlias('~', './home/' . $user->username() . '/'); } return $fs; }
public function __construct() { parent::__construct(); $this->name = 'manifestCall'; $daos = new Daos($this); $this->managers = new Managers($daos); }
$page = 1; $debut = 0; if (isset($_GET['page'])) { $page = $_GET['page']; $debut = $page - 1; $debut *= 50; } ?> <!doctype html> <html lang="fr"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width; initial-scale=1;"> <title><?php echo Application::getApplication($bdd)->applicationNom; ?> administration</title> <!-- La liste des styles propre à l'intranet --> <?php include '../../../include/style.php'; ?> <link href="<?php echo BASEFRONT; ?> js/sweet/sweet.css" rel="stylesheet" type="text/css"> </head> <body> <main id="main">
/** * Initialize this call. */ public function __construct() { parent::__construct(); $this->name = 'api'; }
/** * Initialize this call. */ public function __construct() { parent::__construct(); $this->name = 'rawDataCall'; }
/** * Initialize this interface booter. */ public function __construct() { parent::__construct(); $this->name = 'userInterfaceBooter'; }
} } if ($admin == 1) { $display = 'style="display:block;"'; } /** * Si aucune erreur alors */ if (empty($erreur)) { $sql = $bdd->prepare("INSERT INTO application SET\n applicationCreated = :created,\n applicationNom = :nom,\n applicationDossier = :dossier,\n applicationIcon = :icon,\n applicationUtilisateur = :utilisateur,\n applicationAdmin = :admin,\n applicationAdministrateur = :administrateur "); $sql->execute(array('created' => Tool::dateTime('Y-m-d H:i'), 'nom' => $_POST['nom'], 'dossier' => $dossierSlug, 'icon' => $_POST['icon'], 'utilisateur' => implode(',', $utilisateurs), 'admin' => $_POST['admin'], 'administrateur' => implode(',', $administrateurs))); /* Copie des fichiers sources */ Application::clonseFileSrc('app/', '../../app/' . $dossierSlug . '/'); /* Copie des fichiers de l'administration */ if ($admin) { Application::clonseFileSrc('appAdmin/', '../../app/' . $dossierSlug . '/admin/'); } array_push($succes, 'Application enregistrée avec succès'); /** * Reset des variables */ $nom = ''; $dossier = ''; $icon = ''; $utilisateurs = array(); $admin = 0; $administrateurs = array(); $display = 'style="display:none;"'; $icon = ''; } }
public static function getSession(array $config, \lib\Application $app) { return $app->httpRequest()->session(); }