-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy patheditNotes.inc
More file actions
58 lines (43 loc) · 1.73 KB
/
editNotes.inc
File metadata and controls
58 lines (43 loc) · 1.73 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
// ==================================================================
// Author: Robert Joseph (dart@vizmotion.com)
// Web: http://wiki.bssd.org/index.php/DART_System
// ==================================================================
$site = $_GET['site'];
$priv = Privilege(A29);
if($priv == 'none') { NoPriv("denied Edit", "site=$site"); }
$snotes = getNotes($site);
$important = $snotes['important'];
$warning = $snotes['warning'];
$tip = $snotes['tip'];
$js = "function editSelection(value) {
if (value == \"#save_changes\") {
toggle.loc.value = location.href;
toggle.submit();
} else {
window.location=\"index.php?cmd=editNotes&site=\" + value;
}
}";
$pulldownMenu = "<select name=selectedSite onChange='editSelection(this.value)'>
<option value=''>Choose One</option>";
$sites = getSites($priv);
foreach ($sites as $siteRec) {
$value = $siteRec['siteid'];
$pulldownMenu .= "<option value='$value' " . selected($site, $value) . ">$value</option>
";
}
$pulldownMenu .= "</select>";
$body .= "<form name=toggle method=post action=index.php?cmd=saveNotes>
<input type=hidden name=loc>";
$body .= $pulldownMenu;
$body .= "<input type=reset value=reset>
<input type=submit value='save all changes'><br>";
$body .= "<font size=\"2\"><b>Important:</b></font><br>
<textarea name=\"important\" rows=\"8\" cols=\"80\">$important</textarea><br>
<font size=\"2\"><b>Warning:</b></font><br>
<textarea name=\"warning\" rows=\"8\" cols=\"80\">$warning</textarea><br>
<font size=\"2\"><b>Tip:</b></font><br>
<textarea name=\"tip\" rows=\"8\" cols=\"80\">$tip</textarea><br>";
$body .= "</form>";
include ("template.inc");
?>