addons:hobbitnotes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
addons:hobbitnotes [2017/12/05 02:09] – [bbnote_editor.cgi for 4.3] wikiadminaddons:hobbitnotes [2017/12/05 05:53] – [notes_footer for 4.3] wikiadmin
Line 89: Line 89:
  
 <!-- <!--
-        today = new Date +  today = new Date 
-        weekDayName = new Array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"+  weekDayName = new Array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"
-        monthName = new Array ("Jan","Feb","March","April","May","June","July","Aug","Sep","Oct","Nov","Dec")+  monthName = new Array ("Jan","Feb","March","April","May","June","July","Aug","Sep","Oct","Nov","Dec")
  
-        function printDate() +  function printDate() { 
- +    document.write(weekDayName[today.getDay()]+ ", " + monthName[today.getMonth()] + " " + today.getDate()+ " " + " " + today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds() + " " +today.getFullYear()) 
-        +  }
-        document.write(weekDayName[today.getDay()]+ ", " + monthName[today.getMonth()] + " " + today.getDate()+ " " + " " + today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds() + " " +today.getFullYear()) +
-        }+
 --> -->
  
Line 103: Line 101:
  
 <style type="text/css"> <style type="text/css">
-        body { +  body { 
-        background-repeat: repeat-y; +    background-repeat: repeat-y; 
-        background-color:black; +    background-color:black; 
-         }+   }
 </style> </style>
  
Line 117: Line 115:
  
 <!-- The favicon image --> <!-- The favicon image -->
-<link rel="shortcut icon" href="&XYMONSKIN/favicon-&XYMWEBBACKGROUND.ico">+<link rel="shortcut icon" href="&XYMONSKIN/favicon-&XYMONBACKGROUND.ico">
  
 </HEAD> </HEAD>
- 
-<BODY class="&XYMWEBBACKGROUND"> 
  
 <BODY BGCOLOR="&XYMONBACKGROUND" BACKGROUND="&XYMONSKIN/bkg-&XYMONBACKGROUND.gif" TEXT="#FFFFFF" LINK="#00FFAA" VLINK="#FFFF44"> <BODY BGCOLOR="&XYMONBACKGROUND" BACKGROUND="&XYMONSKIN/bkg-&XYMONBACKGROUND.gif" TEXT="#FFFFFF" LINK="#00FFAA" VLINK="#FFFF44">
  
 +  &XYMONBODYHEADER
 +
 +  <TABLE SUMMARY="Topline" WIDTH="100%">
 +  <TR><TD HEIGHT=16>&nbsp;</TD></TR>  <!-- For the menu bar -->
 +  <TR>
 +    <TD VALIGN=MIDDLE ALIGN=LEFT WIDTH="30%">
 +      <FONT FACE="Arial, Helvetica" SIZE="+1" COLOR="silver"><B><A HREF="https://pbrmon.unx.sas.com/xymon/" style="text-decoration: none">&XYMONLOGO</B></FONT>
 +    </TD>
 +    <TD VALIGN=MIDDLE ALIGN=CENTER WIDTH="40%">
 +      <CENTER><FONT FACE="Arial, Helvetica" SIZE="+1" COLOR="silver"><B>Current Status</B></FONT></CENTER>
 +    </TD>
 +    <TD VALIGN=MIDDLE ALIGN=RIGHT WIDTH="30%">
 +     <FONT FACE="Arial, Helvetica" SIZE="+1" COLOR="silver"><B><script language="javascript" type="text/javascript">printDate()</script></B></FONT>
 +    </TD>
 +  </TR>
 +  <TR>
 +    <TD COLSPAN=3> <HR WIDTH="100%"> </TD>
 +  </TR>
 +  </TABLE>
 +  <BR>
  
-<TABLE SUMMARY="Topline" WIDTH="100%"> 
-<TR><TD HEIGHT=16>&nbsp;</TD></TR>  <!-- For the menu bar --> 
-<TR> 
-  <TD VALIGN=MIDDLE ALIGN=LEFT WIDTH="30%"> 
-    <FONT FACE="Arial, Helvetica" SIZE="+1" COLOR="silver"><B><A HREF="http://xymon/" style="text-decoration: none">&XYMONLOGO</B></FONT> 
-  </TD> 
-  <TD VALIGN=MIDDLE ALIGN=CENTER WIDTH="40%"> 
-    <CENTER><FONT FACE="Arial, Helvetica" SIZE="+1" COLOR="silver"><B>Current Status</B></FONT></CENTER> 
-  </TD> 
-  <TD VALIGN=MIDDLE ALIGN=RIGHT WIDTH="30%"> 
-   <FONT FACE="Arial, Helvetica" SIZE="+1" COLOR="silver"><B><script language="javascript" type="text/javascript">printDate()</script></B></FONT> 
-  </TD> 
-</TR> 
-<TR> 
-  <TD COLSPAN=3> <HR WIDTH="100%"> </TD> 
-</TR> 
-</TABLE> 
-<BR> 
 </code> </code>
 </hidden> </hidden>
Line 180: Line 178:
 <hidden onHidden="Show Code ⇲" onVisible="Hide Code ⇱"> <hidden onHidden="Show Code ⇲" onVisible="Hide Code ⇱">
 <code html> <code html>
-<BR><BR>+  <BR><BR>
  
-<TABLE SUMMARY="Bottomline" WIDTH="100%"> +  <TABLE SUMMARY="Bottomline" WIDTH="100%"> 
-<TR> +    <TR> 
-  <TD> <HR WIDTH="100%"> </TD> +      <TD> <HR WIDTH="100%"> </TD> 
-</TR> +    </TR> 
-<TR> +    <TR> 
-        <TD ALIGN=RIGHT><FONT FACE="Arial, Helvetica" SIZE="-2" COLOR="silver"><B><A HREF="http://xymon.sourceforge.net/" style="text-decoration: none">Xymon &XYMONDREL</A></B></FONT></TD> +      <TD ALIGN=RIGHT><FONT FACE="Arial, Helvetica" SIZE="-2" COLOR="silver"><B><A HREF="http://xymon.sourceforge.net/" style="text-decoration: none">Xymon &XYMONDREL</A></B></FONT></TD> 
-</TR> +    </TR> 
-</TABLE>+  </TABLE>
  
 </BODY> </BODY>
Line 459: Line 457:
 <code perl> <code perl>
 #!/usr/bin/perl #!/usr/bin/perl
- +#
 ############################################# #############################################
 # Name: bbnote_editor.cgi # Name: bbnote_editor.cgi
Line 467: Line 465:
 # Version: 1.0 # Version: 1.0
 # The text2html module can be downloaded from CPAN ############################################# # The text2html module can be downloaded from CPAN #############################################
- +
 use strict; use strict;
 use CGI ":standard"; use CGI ":standard";
 use HTML::FromText; use HTML::FromText;
  
-  
 # Your $XYMONHOME # Your $XYMONHOME
-my $xymon_home = "/home/xymon/server"; +my $xymon_home = "/usr/share/xymon"; 
-# hobbit config file +my $xymon_cmd = "$xymon_home/bin/xymon"; 
-my $xymoncfg="$xymon_home/etc/xymonserver.cfg"; +xymon config file 
-The web path to gifs. +my $xymoncfg = "$xymon_home/etc/xymonserver.cfg"; 
-my $xymon_gifs = "$xymon_home/www/gifs/"; # The main web path for xymon display. + 
-my $xymon_web  = "/xymon/"; +# The actual www notes dir on the server 
-  +my $xymon_notes  = "/var/www/xymon/notes"; # This is where the data files are stored.
-# The actual www notes dir on the server  +
-my $xymon_notes  = "$xymon_home/www/notes"; # This is where the data files are stored.+
 # Not to be confused with the default notes dir. # Not to be confused with the default notes dir.
-my $xymon_notesdata  = "$xymon_home/etc/notesdata"; +my $xymon_notesdata  = "$xymon_home/etc/notesdata";
 my $xymon_header = "$xymon_home/web/notes_header"; # Change this if needed. my $xymon_header = "$xymon_home/web/notes_header"; # Change this if needed.
 my $xymon_footer = "$xymon_home/web/notes_footer"; # Change this if needed. my $xymon_footer = "$xymon_home/web/notes_footer"; # Change this if needed.
 +
 #Standard hosts.cfg file #Standard hosts.cfg file
-my $xymon_hosts = "$xymon_home/etc/hosts.cfg";  +my $xymon_hosts = "$xymon_home/hosts.cfg"; 
-my $xymon_showhosts = "$xymon_home/bin/bbhostshow"; +my $xymon_menu = "$xymon_home/etc/xymonmenu.cfg"; 
- +
 # No changes needed below. # No changes needed below.
-my $version = "4.3.5";+my $version = "4.3.28";
 my $color = "blue"; my $color = "blue";
 my %hosts; my %hosts;
Line 501: Line 497:
 my $note = param("note"); my $note = param("note");
 my @lines; my @lines;
-  + 
-# Set up the environment variables and dynamic variables from xymonserver.cfg  +# Set up the environment variables and dynamic variables from xymonserver.cfg 
-foreach (`$xymoncfg; set`) { +foreach (`$xymon_home/bin/xymoncmd env | /usr/bin/grep XYMON`) { 
-    chomp; +  chomp; 
-    my ($var,$val) = /^\s*(.*?)\s*=\s*(.*)/; +  next if $_ =~ /^directory/; 
-    $ENV{$var}  = $val;+  my ($var,$val) = /^\s*(.*?)\s*=\s*(.*)/; 
 +  $ENV{$var} = $val;
 } }
  
-$ENV{'XYMONBODYHEADER'}='file:/home/xymon/server/etc/xymonmenu.cfg'; 
-  
 sub print_notesdata { sub print_notesdata {
-    open (NOTESDATA, "<$xymon_notesdata/${host}") or &print_error("I can't read from $xymon_notesdata/$host!"); +  open (NOTESDATA, "<$xymon_notesdata/${host}") or &print_error("I can't read from $xymon_notesdata/$host!"); 
-    while (<NOTESDATA>) { +  while (<NOTESDATA>) { 
-        print; +    print; 
-    +  
-    close NOTESDATA;+  close NOTESDATA;
 } }
- +
 sub write_notesdata { sub write_notesdata {
-    open (NOTESDATA, ">$xymon_notesdata/$host") or &print_error("I can't write to $xymon_notesdata/$host!"); +  open (NOTESDATA, ">$xymon_notesdata/$host") or &print_error("I can't write to $xymon_notesdata/$host!"); 
-    print NOTESDATA $note; +  print NOTESDATA $note; 
-    close NOTESDATA;+  close NOTESDATA;
 } }
- +
 sub make_note { sub make_note {
-    my ($color) = @_; +  my ($color) = @_; 
-    my $note = "$xymon_notes/${host}.html"; +  my $note = "$xymon_notes/${host}.html"; 
-  + 
-    open (NOTE, ">$note") or &print_error("I can't open $note for writing!"); +  open (NOTE, ">$note") or &print_error("I can't open $note for writing!"); 
-    select NOTE; +  select NOTE; 
-    &print_header($color); +  &print_header($color); 
-    &print_notesdata; +  &print_notesdata; 
-    &print_footer($color); +  &print_footer($color); 
-    select STDOUT; +  select STDOUT; 
-    close NOTE; +  close NOTE;
- +
 } }
- +
 sub save_note { sub save_note {
-    &write_notesdata; +  &write_notesdata; 
-    &make_note('blue'); +  &make_note('blue'); 
-    &get_note; +  &get_note; 
-    print '<center><b><font color="white">Note saved.</font></b></center><p>'; +  print '<center><b><font color="white">Note saved.</font></b></center><p>'; 
-    &print_note;+  &print_note;
 } }
- +
 sub edit_note { sub edit_note {
-    if ($cmd =~ /add html/) { +  if ($cmd =~ /add html/) { 
-        my $t2h = HTML::FromText->new({ +    my $t2h = HTML::FromText->new({ 
-            blockcode  => 1, +              blockcode  => 1, 
-            lines      => 1, +              lines      => 1, 
-            tables     => 1, +              tables     => 1, 
-            bullets    => 1, +              bullets    => 1, 
-            numbers    => 1, +              numbers    => 1, 
-            urls       => 1, +              urls       => 1, 
-            email      => 1, +              email      => 1, 
-            bold       => 1, +              bold       => 1, 
-            underline  => 1, +              underline  => 1, 
-        }); +              }); 
-        $note = $t2h->parse( $note ); +    $note = $t2h->parse( $note ); 
-        #$note =~ s/\n/<br>/sgi;+    #$note =~ s/\n/<br>/sgi;
-  +  
-    + 
-    if ($cmd =~ /strip html/) { +  if ($cmd =~ /strip html/) { 
-        $note =~ s/<.*?>//sgi; +    $note =~ s/<.*?>//sgi; 
-    +  
-    print <<HTML; + 
-<CENTER><TABLE BORDER="1" CELLPADDING="3><CAPTION><H2><CENTER>$host [$hosts{$host}]</CENTER></H2></CAPTION> +  print <<HTML; 
-<TR><TD ALIGN="CENTER"><form method="POST"><input type="hidden" name="host" value="$host"> <TEXTAREA ROWS="35" COLS="80" NAME="note" STYLE="background-color:#000033;color:dddddd">+<CENTER> 
 +  <TABLE BORDER="1" CELLPADDING="3"> 
 +    <CAPTION> 
 +      <H2><CENTER>$host [$hosts{$host}]</CENTER></H2> 
 +    </CAPTION> 
 +    <TR> 
 +      <TD ALIGN="CENTER"> 
 +        <form method="POST"> 
 +          <input type="hidden" name="host" value="$host"> 
 +          <TEXTAREA ROWS="35" COLS="80" NAME="note" STYLE="background-color:#000033;color:dddddd">
 HTML HTML
-if ($note) {+  if ($note) {
     print $note;     print $note;
-} elsif ($lines[0]) {+  } elsif ($lines[0]) {
     print @lines;     print @lines;
-} else {+  } else {
     print '<!-- Remember to use proper HTML formatting here. -->'; }     print '<!-- Remember to use proper HTML formatting here. -->'; }
     print <<HTML;     print <<HTML;
-</TEXTAREA><br> +          </TEXTAREA><br> 
-<input name="cmd" value="preview" type="submit"> <input name="cmd" value="add html tags" type="submit"> <input name="cmd" value="strip html tags" type="submit"> <input name="cmd" value="cancel" type="submit"></form></TD></TR></TABLE></CENTER>+          <input name="cmd" value="preview" type="submit"> <input name="cmd" value="add html tags" type="submit"> <input name="cmd" value="strip html tags" type="submit"> <input name="cmd" value="cancel" type="submit"> 
 +        </form> 
 +      </TD> 
 +    </TR> 
 +  </TABLE> 
 +</CENTER>
 HTML HTML
 } }
- +
 sub print_note { sub print_note {
 +  print <<HTML;
 +<CENTER>
 +  <TABLE WIDTH="75%" BORDER="1" CELLPADDING="3">
 +    <CAPTION>
 +      <CENTER><H2>$host [$hosts{$host}]</H2></CENTER>
 +    </CAPTION>
 +    <TR>
 +      <TD>
 +HTML
 +  if ($lines[0]) {
 +    print @lines;
     print <<HTML;     print <<HTML;
-<CENTER><TABLE WIDTH="75%BORDER="1CELLPADDING="3"><CAPTION><CENTER><H2>$host [$hosts{$host}]</H2></CENTER></CAPTION><TR><TD>+      </TD> 
 +    </TR> 
 +    <TR> 
 +      <TD ALIGN="CENTER"> 
 +        <form method="POST"
 +          <input type="hiddenname="host" value="$host">
 HTML HTML
-    if ($lines[0]) { +  } elsif ($cmd =~ /preview/) { 
-        print @lines; +    print <<HTML; 
-        print <<HTML; +        $note 
-</TD></TR><TR><TD ALIGN="CENTER"><form method="POST"><input type="hidden" name="host" value="$host"> +      </TD> 
 +    </TR> 
 +    <TR> 
 +      <TD ALIGN="CENTER"> 
 +        <form method="POST"> 
 +          <input type="hidden" name="host" value="$host"> <input name="cmd" value="save" type="submit">
 HTML HTML
-    elsif ($cmd =~ /preview/+  else 
-        print <<HTML; +    print <<HTML; 
-$note</TD></TR><TR><TD ALIGN="CENTER"><form method="POST"><input type="hidden" name="host" value="$host"> <input name="cmd" value="save" type="submit"> +      The are no notes for $host [$hosts{$host}]. 
 +    </TD> 
 +  </TR> 
 +  <TR> 
 +    <TD ALIGN="CENTER"> 
 +      <form method="POST"> 
 +        <input type="hidden" name="host" value="$host">
 HTML HTML
-    } else { +  }
-        print <<HTML; +
-The are no notes for $host [$hosts{$host}].</TD></TR> <TR><TD ALIGN="CENTER"><form method="POST"><input type="hidden" name="host" value="$host">  +
-HTML  +
-}+
     print <<HTML;     print <<HTML;
-<input type="hidden" name="note" value='$note'> <input name="cmd" value="edit" type="submit"> <input name="cmd" value="list" type="submit"></form></TD></TR></TABLE></CENTER>+          <input type="hidden" name="note" value='$note'> <input name="cmd" value="edit" type="submit"> <input name="cmd" value="list" type="submit"> 
 +        </form> 
 +      </TD> 
 +    </TR> 
 +  </TABLE> 
 +</CENTER>
 HTML HTML
 } }
- +#
 sub print_error { sub print_error {
-    my $error = shift; +  my $error = shift; 
-    print "<center><b><font color=\"red\">$error</font></b></center><p>";+  print "<center><b><font color=\"red\">$error</font></b></center><p>";
 } }
- +
 sub get_note { sub get_note {
-    if ( -s "$xymon_notesdata/$host") { +  if ( -s "$xymon_notesdata/$host") { 
-        open (NOTE, "<$xymon_notesdata/$host") or &print_error("I can't open $xymon_notesdata/$host for reading!"); +    open (NOTE, "<$xymon_notesdata/$host") or &print_error("I can't open $xymon_notesdata/$host for reading!"); 
-        while (my $note = <NOTE>) { +    while (my $note = <NOTE>) { 
-            push @lines, $note+      push @lines, $note;
-        } +
-        close NOTE;+
     }     }
 +    close NOTE;
 +  }
 } }
-  + 
-sub print_menu{ +sub print_menu { 
-    print '<CENTER><TABLE BORDER="1" CELLPADDING="3"><CAPTION><H2><CENTER>Xymon Notes</CENTER></H2><b></b></CAPTION>'; +  print '<CENTER><TABLE BORDER="1" CELLPADDING="3"><CAPTION><H2><CENTER>Xymon Notes</CENTER></H2><b></b></CAPTION>'; 
-    for my $host(sort keys %hosts) { +  for my $host(sort keys %hosts) { 
-        print <<HTML;+    print <<HTML;
 <TR><TD>$host</TD><TD>$hosts{$host}</TD> <TR><TD>$host</TD><TD>$hosts{$host}</TD>
-<TD><form method="POST"><input type="hidden" name="host" value="$host"> <input name="cmd" value="view" type="submit"> <input name="cmd" value="edit" type="submit"></form></TD></TR> +<TD><form method="POST"><input type="hidden" name="host" value="$host"> <input name="cmd" value="view" type="submit"> <input name="cmd" value="edit" type="submit"></form></TD></TR>
 HTML HTML
-    +  
-    print '</TABLE></CENTER>';+  print '</TABLE></CENTER>';
 } }
-  + 
-sub get_hosts{ +sub get_hosts { 
-    open (HOSTS, "-|", $xymon_showhosts$xymon_hosts) or &print_error("I can't open $xymon_hosts!"); +  open (HOSTS, "-|", $xymon_cmd'127.0.0.1', 'hostinfo') or &print_error("I can't open $xymon_hosts!"); 
-    while (<HOSTS>) { +  while (<HOSTS>) { 
-        if (/^(\d+\.\d+\.\d+\.\d+)\s+(.*?)\s+/{ +    my ($hostname, $hostip, @dummy= split('\|'); 
-            $hosts{$2} = $1+    $hosts{$hostname} = $hostip
-        +  
-    } +  close HOSTS;
-    close HOSTS;+
 } }
- +
 sub print_header { sub print_header {
-    my $color = shift; +  my $color = shift; 
-    print "Content-type: text/html; charset=iso-8859-1\n\n"; +  print "Content-type: text/html; charset=iso-8859-1\n\n"; 
-    open (HEAD, "<$xymon_header") or &print_error("I can't open $xymon_header for reading!"); +  open (HEAD, "<$xymon_header") or &print_error("I can't open $xymon_header for reading!"); 
-    while (<HEAD>) { +  while (<HEAD>) { 
-       # It's a bit hard to edit with a refresh ;) +    # It's a bit hard to edit with a refresh ;) 
-        if (/META/i && /HTTP-EQUIV/i && /REFRESH/i && /CONTENT/i) { s/<(.*?)>/<!-- Refresh removed -->/g; } +    if (/META/i && /HTTP-EQUIV/i && /REFRESH/i && /CONTENT/i) { s/<(.*?)>/<!-- Refresh removed -->/g; } 
-        s/&XYMONLOGO/$ENV{'XYMONLOGO'}/g; +    s/&XYMONLOGO/$ENV{'XYMONLOGO'}/g; 
- s/&XYMONBACKGROUND/$color/g; +    s/&XYMONBACKGROUND/$color/g; 
-        s/&XYMONMENUSKIN/$ENV{'XYMONMENUSKIN'}/g; +    s/&XYMONBODYCSS/$ENV{'XYMONBODYCSS'}/g; 
-        s/&XYMONPAGEPATH/$ENV{'XYMONPAGEPATH'}/g; +    s/&XYMONBODYMENUCSS/$ENV{'XYMONBODYMENUCSS'}/g; 
-        s/&XYMONSKIN/$ENV{'XYMONSKIN'}/g; +    s/&XYMONMENUSKIN/$ENV{'XYMONMENUSKIN'}/g; 
-        s/&XYMONDATE/$ENV{'XYMONDATE'}/g;+    s/&XYMONPAGEPATH/$ENV{'XYMONPAGEPATH'}/g; 
 +    s/&XYMONSKIN/$ENV{'XYMONSKIN'}/g; 
 +    s/&XYMONDATE/$ENV{'XYMONDATE'}/g; 
 + 
 +    if (/&XYMONBODYHEADER/) { 
 +      s/&XYMONBODYHEADER//g; 
 +      open (MENU, "<$xymon_menu") or &print_error("I can't open $xymon_menu for reading!"); 
 +      while (<MENU>) { 
 +        s/\$XYMONSERVERWWWURL/$ENV{'XYMONSERVERWWWURL'}/g; 
 +        s/\$XYMONSERVERCGIURL/$ENV{'XYMONSERVERCGIURL'}/g; 
 +        s/\$XYMONSERVERSECURECGIURL/$ENV{'XYMONSERVERSECURECGIURL'}/g;
         print;         print;
 +      }
 +      close MENU;
     }     }
-    close HEAD;+    print; 
 +  } 
 +  close HEAD;
 } }
-  + 
-sub print_footer{ +sub print_footer { 
-    open (FOOT, "<$xymon_footer") or &print_error("I can't open $xymon_footer for reading!"); +  open (FOOT, "<$xymon_footer") or &print_error("I can't open $xymon_footer for reading!"); 
-    while (<FOOT>) { +  while (<FOOT>) { 
-        s/&XYMONMENUSKIN/$ENV{'XYMONMENUSKIN'}/g; +    s/&XYMONMENUSKIN/$ENV{'XYMONMENUSKIN'}/g; 
-        s/&XYMONDREL/$version/g; +    s/&XYMONDREL/$version/g; 
-        print; +    print; 
-    +  
-    close FOOT;+  close FOOT;
 } }
- +
 # Main # Main
 my ($oldbar) = $|; my ($oldbar) = $|;
 my $cfh = select (STDOUT); my $cfh = select (STDOUT);
 $| = 1; $| = 1;
-  
 &get_hosts; &get_hosts;
 &print_header($color); # I like blue ;) &print_header($color); # I like blue ;)
 if ($cmd =~ /edit|html/) { if ($cmd =~ /edit|html/) {
-    &get_note; +  &get_note; 
-    &edit_note;+  &edit_note;
 } elsif ($cmd eq 'view') { } elsif ($cmd eq 'view') {
-    &get_note; +  &get_note; 
-    &print_note;+  &print_note;
 } elsif ($cmd eq 'preview') { } elsif ($cmd eq 'preview') {
-    &print_note;+  &print_note;
 } elsif ($cmd eq 'preview as html') { } elsif ($cmd eq 'preview as html') {
-    &print_note;+  &print_note;
 } elsif ($cmd eq 'save') { } elsif ($cmd eq 'save') {
-    &save_note;+  &save_note;
 } else { } else {
-    &print_menu;+  &print_menu;
 } }
- +
 &print_footer; &print_footer;
- +
 $| = $oldbar; $| = $oldbar;
- select ($cfh);+select ($cfh); 
 </code> </code>
 </hidden> </hidden>
  • addons/hobbitnotes.txt
  • Last modified: 2017/12/05 05:54
  • by wikiadmin