<?php include 'class.php'; $a = new usuario(); $a->sessionstarter1(); $c = new IT_Assets(); if ($a->edbu == 0) { echo "Ud no tiene permiso para estar aca."; } else { $c->getall($a->compid); }
<html> <head> <link type="text/css" rel="stylesheet" href="css.css"> <?php include 'class.php'; $a = new usuario(); $b = new IT_Assets(); $a->sessionstarter(); $b->name = $_POST['name']; $b->budg = $_POST['budg']; $b->head = $_POST['head']; $b->insertit($a->compid); if ($b->help == 1) { echo "It has been successfully inserted"; header("Location:menuuser.php"); } else { echo "Somethink went wrong, try again"; } echo "<br><br>"; echo "<a href = 'menuuser.php'><input type='submit' value='Back to Menu'></a>"; echo "<br>"; echo "<br>"; echo "<br>"; echo "<br>"; ?> </html>
<?php include 'class.php'; $a = new usuario(); $a->sessionstarter(); $b = new IT_Assets(); $b->borrar(); if ($b->help == 1) { header("Location: granit.php"); echo "Actualizacion exitosa"; } else { //header("Location: ModifIT.php"); echo "Algo salio muy mal...."; }
<?php include 'class.php'; $a = new usuario(); $a->sessionstarter(); $b = new IT_Assets(); $b->id = $_POST['id']; $b->name = $_POST['name']; $b->budg = $_POST['budg']; $b->head = $_POST['head']; $b->editar(); if ($b->help == 1) { header("Location: menuuser.php"); echo "Actualizacion exitosa"; } else { //header("Location: ModifIT.php"); echo "Algo salio muy mal...."; }
<html> <head> <link type="text/css" rel="stylesheet" href="css.css"> </head> <body> <?php include 'class.php'; $a = new usuario(); $a->sessionstarter(); $b = new IT_Assets(); if ($a->edit == 0) { echo "You can't be here"; } else { echo "<form action = UpdateIT.php method='POST'>"; $b->preupdatear(); echo "Name : <input type='text' name=name value=" . $b->name . "><br>"; echo "Budget : \t<input type='number' name=budg value=" . $b->budg . "><br>"; echo "Headcount : <input type='number' name=head value=" . $b->head . "><br>"; echo "<input type='text' name =id value=" . $b->id . " style='display:none'><br>"; echo "<input type='submit' value='Send'>"; echo "</form>"; } ?> </body> </html>