function create($_POST) { if (isset($_POST['back'])) { return newcomp("", $_POST['name'], ""); } /** * so how does this progress work? * * just require the progress library and call displayProgress() * specifying which template to use. */ require_lib("progress"); displayProgress("newtemplate.php"); return creation($_POST); }
<?php /** * Created by PhpStorm. * User: baptiste * Date: 09/02/2016 * Time: 22:51 */ $className = $argv[1]; $code = "<?php\n\nnamespace App\\Controller;\n\n"; $code .= "class {$className} \n{\n}"; function creation($className, $code) { if (!file_exists($className . ".php")) { file_put_contents("../src/Controller/" . $className . ".php", $code); } else { var_dump("can't create your file"); } } creation($className, $code);
session_start(); $vueAuth = new VueAuth(); $vueAuth->setSiteName($nomSite); if (isset($_REQUEST['action'])) { $action = $_REQUEST['action']; if ($action == 'connexion') { connexion($vueAuth); } else { if ($action == 'deconnexion') { deconnexion($vueAuth); } else { if ($action == 'validerCreation') { validNew($vueAuth); } else { if ($action == 'creation') { creation($vueAuth); } else { if ($action == "pageReinitPass") { pageReinitPass($vueAuth); } else { if ($action == "reinitPass") { reinitPass($vueAuth); } else { if ($action == "validRecupPass") { validRecupPass($vueAuth); } else { if ($action == 'activation') { activation($vueAuth); } else { if ($action == 'profil') { pageProfil($vueAuth);