Example #1
0
	<!-- 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>

	<!-- Logic for the create page -->
	<?php 
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    ?>
		<?php 
    if ($formIsValid) {
        ?>
			<?php 
        $notesRepo = new \abhijeet\NFS\FileNotesRepo();
        $notes = new \abhijeet\NFS\Notes();
        $notes->setSubject($notesSubject);
        $notes->setAuthor($notesAuthor);
        $notes->setBody($notesBody);
        $notes->setPriority($notesPriority);
        $notesRepo->saveNotes($notes);
        ?>
			<div class="container-fluid">
				<!-- Review create page -->
				<h1> New note created </h1>
				<table class="table">
					<caption> Review created note </caption>
					<tbody>
						<tr>
							<td width="100px;"><label> Subject: </label></td>
Example #2
0
<?php

// Link to the class files
require_once 'FileNotesRepo.php';
require_once 'Notes.php';
$notesRepo = new \abhijeet\NFS\FileNotesRepo();
$notesList = $notesRepo->getAllNotes();
?>

<!-- Index page -->
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title> Notes </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">
		#myTable {
			width: 100%;
			table-layout: fixed;
		}

		.overflowText {
			overflow: hidden;
Example #3
0
<?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">
Example #4
0
<?php

// Link to the class files
require_once 'FileNotesRepo.php';
require_once 'Notes.php';
$notesRepo = new \abhijeet\NFS\FileNotesRepo();
?>
<!-- Logic for the delete page -->
<?php 
if ($_SERVER['REQUEST_METHOD'] == "POST" && !empty($_POST['id'])) {
    ?>
	<?php 
    $notesRepo->deleteNotes($_POST['id']);
    ?>

	<!-- Delete page -->
	<!DOCTYPE html>
	<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title> Delete 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">
Example #5
0
<?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 {
<?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);
?>
<!-- Logic for the delete confirmation page -->
<?php 
if ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_POST['id'])) {
    ?>
	<?php 
    $notes = $notesRepo->getNotesById($_POST['id']);
    ?>

	<!-- Delete confirmation page -->
	<!DOCTYPE html>
	<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title> Delete 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>
		<!-- Inbody stylesheet -->