Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. $id = $_POST['id'];
  2. $DsMsg = $_POST['Msg'];
  3. $InAtivo = $_POST['InAtivo'];
  4. $DtInicio = $_POST['DtInicio'];
  5. $DtFim = $_POST['DtFim'];
  6.  
  7. $objNot = new Not();
  8. $objNot->setid($id);
  9. $objNot->setmsg($DsMsg);
  10. $objNot->setativo($InAtivo);
  11. $objNot->setini($DtInicio);
  12. $objNot->setfim($DtFim);
  13.  
  14. $controller = new Notifica($conn);
  15.  
  16.  
  17. if (!empty($id)){
  18. $objNot->setid($id);
  19. $controller->editarNot($objNot);
  20. }
  21.  
  22. header ("location: ../view/home.php?id=".$id);
  23.  
  24. <?php
  25. foreach ($controller->ListaNot() as $objNot){
  26. echo '<li><a href="editNot.php?id=' . $objNot->getid() . '">Editar</a></li>';
  27.  
  28. if($DtInicio == date('Y-m-d')){
  29. echo $objNot->getmsg();
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement