Example #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $projet = projet::find($id);
     $projet->delete();
     $projets = projet::all();
     return view('projet/liste', ['projets' => $projets]);
 }
<?php

if ($_SESSION['stats'] != 1) {
    echo "<script language=javascript> alert('Vous devez connecter .!');\n                document.location.href='../View/index.php';\n            </script> ";
} else {
    include '../Model/projet.php';
    $p = new projet("", "");
    $p->print_select();
}
<?php

session_start();
require './Includes/includesKernel.php';
require './Includes/includesProjet.php';
// temporaire
// fin temporaire
if (isset($_POST['action']) && $_POST['action'] == 'Creer' && $_SESSION['isAdmin'] == 1) {
    $projet_id = 0;
} else {
    header('Location: ./index.php');
}
if (isset($_POST['postform'])) {
    $project = new projet($bdd, $_POST['titre_projet'], $_POST['deadline']);
    $_SESSION['idProjet'] = $project->newProject();
    header('location: ./modifierUnProjet.php');
}
?>
	
<!DOCTYPE html>
<html>
	<head>
		<title>Créer un projet</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="style.css">
		<script type="text/javascript" src="JS/validFormulaire.js"></script>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
		<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
		<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
		<script type="text/javascript">
		    $(document).ready(function() {
Example #4
0
<?php

if ($_SESSION['stats'] != 1) {
    echo "<script language=javascript> alert('Vous devez connecter .!');\n                document.location.href='../View/index.php';\n            </script> ";
} else {
    /* 
     * To change this license header, choose License Headers in Project Properties.
     * To change this template file, choose Tools | Templates
     * and open the template in the editor.
     */
    include '../Model/projet.php';
    $f = new projet("", "");
    $f->select_projet();
}
<?php

if ($_SESSION['stats'] != 1) {
    echo "<script language=javascript> alert('Vous devez connecter .!');\n                document.location.href='../View/index.php';\n            </script> ";
} else {
    include '../Model/projet.php';
    if ($_POST) {
        $p = new projet("", "");
        $p->set_code($_POST['code_textbox']);
        $p->set_libelle($_POST['libelle_textbox']);
        $p->insert_projet();
    }
}