<?php // Link to the class files require_once 'Notes.php'; require_once 'FileNotesRepo.php'; $notesRepo = new \abhijeet\NFS\FileNotesRepo(); ?> <!-- Logic for the edit page --> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_POST['id'])) { ?> <?php $notes = $notesRepo->getNotesById($_POST['id']); ?> <!-- Edit page --> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title> Edit note </title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!-- jQuery library --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <!-- Latest compiled JavaScript --> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> </head> <body> <div class="container-fluid">
<?php // Link to the class files require_once 'FileNotesRepo.php'; require_once 'Notes.php'; $notesRepo = new \abhijeet\NFS\FileNotesRepo(); $notesId = isset($_GET['id']) ? $_GET['id'] : ''; $notes = $notesRepo->getNotesById($notesId); if ($notes) { ?> <!-- Show page --> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title> Show note <?php print $notes->getSubject(); ?> </title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!-- jQuery library --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <!-- Latest compiled JavaScript --> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <!-- Inbody stylesheet --> <style type="text/css"> .button-container form, .button-container form div {