-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNoteTemplate.php
More file actions
37 lines (30 loc) · 1.32 KB
/
NoteTemplate.php
File metadata and controls
37 lines (30 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
require_once('functions.php');
function NoteTemplate($in_array) {
extract($in_array);
$output = '<div class="noteBox">';
$output .= '<span class="noteID">#' . htmlspecialchars($note_id, ENT_HTML5, 'UTF-8') . '</span>';
$output .= '<span class=floatButtons">';
// Update mark
$output .= '<form action="update.php" method="post">';
foreach ($in_array as $attr => $val) {
$output .= '<input type="hidden" name="' . $attr .
'" value="' . htmlspecialchars($val, ENT_HTML5, 'UTF-8') . '" />';
}
$output .= '<input name="update" type="submit" value="✎" class="updateMark" />';
$output .= '</form>';
// Delete mark
$output .= '<form action="" method="post">';
$output .= '<input type="hidden" name="note_id" value="' . $note_id . '" />';
$output .= '<input name="delete" type="submit" value="✘" class="deleteMark" />';
$output .= '</form>';
$output .= '</span>';
$output .= '<br>';
$output .= '<span class="noteShortName">' . htmlspecialchars($short_name, ENT_HTML5, 'UTF-8') . '</span>';
$output .= '<br>';
$output .= '<span class="noteLongDesc">' . htmlspecialchars($long_desc, ENT_HTML5, 'UTF-8') . '</span>';
$output .= '<br>';
$output .= '<span class="noteCreatorName">-' . htmlspecialchars($creator_name, ENT_HTML5, 'UTF-8') . '</span>';
$output .= '</div>';
return $output;
}