Exemple #1
0
<?php

include 'config/autoload.php';
if (!isset($_GET['id'])) {
    header('Location: categories.php');
}
$area = getArea($db, $_GET['id']);
if (isset($_POST['title'])) {
    updateArea($db, $_GET['id'], $_POST['title']);
    header('Location: categories.php');
}
?>

<h3>Gestion des catégories : domaine, priorité et thème</h3>

<form action="editArea.php?id=<?php 
echo $_GET['id'];
?>
" method="post">
  <fieldset>
    <legend>Edition du domaine :</legend>
    <input type="text" name="title" value="<?php 
echo $area['title'];
?>
" placeholder="Libellé du domaine" required>*
    <hr>
    <input type="submit" value="Editer le domaine">
    <input type="reset" value="Reset">
    <a href="categories.php"><input type="button" value="Retour"></a>
  </fieldset>
</form>
Exemple #2
0
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
// $Id: editArea.php,v 1.4 2005/10/30 22:37:19 atrommer Exp $
checkUser($_SESSION['USERTYPE'], 2);
/*
 * This page takes a post from the assignemps page
 * and allows a super to edit the details of the area.
 * It also allows them to call the editPos page for position edits
 */
// check for postback
if ($_POST['isPostback']) {
    // do the updates
    updateArea($_POST);
    redirect('assignEmps.php');
}
// first we get the area details
$oAreaDetails = getAreas($_SESSION['USERID'], $_REQUEST['area']);
// now get the area template
$sATempl = getAreaTempl($_REQUEST['area']);
// next get the cur super's super list
if ($_SESSION['USERTYPE'] == 2) {
    // grab the supers child supers
    $oSupers = getChildSupers($_SESSION['USERID']);
} else {
    $oSupers = getSupervisors();
}
// get the area supers
$oAreaSuper = getAreaSuper($_REQUEST['area']);