-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #161 from darnuria/rewrite/objets
Rewrite/objets
- Loading branch information
Showing
7 changed files
with
239 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,73 @@ | ||
<?php session_start(); | ||
<?php | ||
/* | ||
+ Oressource | ||
+ Copyright (C) 2014-2017 Martin Vert and Oressource devellopers | ||
+ | ||
+ This program is free software: you can redistribute it and/or modify | ||
+ it under the terms of the GNU Affero General Public License as | ||
+ published by the Free Software Foundation, either version 3 of the | ||
+ License, or (at your option) any later version. | ||
+ | ||
+ This program is distributed in the hope that it will be useful, | ||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
+ GNU Affero General Public License for more details. | ||
+ | ||
+ You should have received a copy of the GNU Affero General Public License | ||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
+ */ | ||
+ | ||
+ | ||
+// Oressource 2017, | ||
Oressource | ||
Copyright (C) 2014-2017 Martin Vert and Oressource devellopers | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as | ||
published by the Free Software Foundation, either version 3 of the | ||
License, or (at your option) any later version. | ||
//Vérification des autorisations de l'utilisateur et des variables de session requisent pour l'affichage de cette page: | ||
if (isset($_SESSION['id']) AND $_SESSION['systeme'] = "oressource" AND (strpos($_SESSION['niveau'], 'g') !== false)) | ||
{ include "tete.php" ?> | ||
<div class="container"> | ||
<h1>Grille des prix</h1> | ||
<div class="panel-heading">Modifier les données concernant l'objet n° <?php echo $_POST['id']?>, <?php echo $_POST['nom']?>. </div> | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
session_start(); | ||
|
||
<div class="panel-body"> | ||
<div class="row"> | ||
<form action="../moteur/modification_objet_post.php" method="post"> | ||
<input type="hidden" name ="id" id="id" value="<?php echo $_POST['id']?>"> | ||
<input type="hidden" name ="typo" id="typo" value="<?php echo $_POST['typo']?>"> | ||
|
||
<div class="col-md-2"><label for="nom">Nom:</label> <input type="text"value ="<?php echo $_POST['nom']?>" name="nom" id="nom" class="form-control " required autofocus></div> | ||
<div class="col-md-3"><label for="description">Description:</label> <input type="text"value ="<?php echo $_POST['description']?>" name="description" id="description" class="form-control " required ></div> | ||
<div class="col-md-1"><label for="prix">Prix:</label> <input type="text"value ="<?php echo $_POST['prix']?>" name="prix" id="prix" class="form-control " required ></div> | ||
|
||
<div class="col-md-1"><br><button name="creer" class="btn btn-warning">Modifier</button></div> | ||
</form> | ||
<br> | ||
|
||
require_once('../moteur/dbconfig.php'); | ||
require_once('../core/session.php'); | ||
require_once('../core/requetes.php'); | ||
|
||
if (isset($_SESSION['id']) | ||
&& $_SESSION['systeme'] === 'oressource' | ||
&& is_allowed_bilan()) { | ||
|
||
require_once 'tete.php'; | ||
|
||
$id_obj = filter_input(INPUT_GET, 'id_obj', FILTER_VALIDATE_INT); | ||
|
||
<a href="grilles_prix.php<?php echo"?typo=".$_POST['typo']?>"> | ||
<button name="creer" class="btn btn">Anuler</button> | ||
</a> | ||
|
||
</div> | ||
</div> | ||
|
||
<br> | ||
|
||
$obj = objet_id($bdd, $id_obj); | ||
|
||
?> | ||
<div class="container"> | ||
<h1>Grille des prix</h1> | ||
<div class="panel-heading">Modifier les données concernant l'objet n° <?= $obj['id'] ?>, <?= $obj['nom'] ?>.</div> | ||
<div class="panel-body"> | ||
<div class="row"> | ||
<div class="col-md-4"></div> | ||
<div class="col-md-4"><br> </div> | ||
<div class="col-md-4"></div> | ||
</div> | ||
</div> | ||
<form action="../moteur/modification_objet_post.php" method="post"> | ||
<input type="hidden" name="id" id="id" value="<?= $obj['id'] ?>"> | ||
<div class="col-md-2"> | ||
<label for="nom">Nom:</label> | ||
<input type="text" value="<?= $obj['nom'] ?>" name="nom" id="nom" class="form-control" required autofocus> | ||
</div> | ||
<div class="col-md-3"> | ||
<label for="description">Description:</label> | ||
<input type="text" value="<?= $obj['description'] ?>" name="description" id="description" class="form-control" required> | ||
</div> | ||
<div class="col-md-1"> | ||
<label for="prix">Prix:</label> | ||
<input type="text" value="<?= $obj['prix'] ?>" name="prix" id="prix" class="form-control" required> | ||
</div> | ||
<div class="col-md-1"> | ||
<br> | ||
<button name="creer" class="btn btn-warning">Modifier</button> | ||
</div> | ||
</form> | ||
<br> | ||
<a href="grilles_prix.php?type_dechet=<?= $obj['id_type_dechet'] ?>"> | ||
<button name="creer" class="btn btn">Annuler</button> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div><!-- /.container --> | ||
|
||
<?php include "pied.php"; | ||
} | ||
else | ||
{ | ||
header('Location: ../moteur/destroy.php') ; | ||
<?php | ||
require_once "pied.php"; | ||
} else { | ||
header('Location: ../moteur/destroy.php'); | ||
} | ||
?> |
Oops, something went wrong.