0ddf7aed92edb10519bdeaed9662c56bd187928e
[staff.git] / table.html
1 <!-- #include "header.incl" -->
2 <!-- HEADER BEGIN -->
3
4 <HTML>
5 <HEAD>
6
7 <TITLE>Viberation</TITLE>
8
9 <SCRIPT LANGUAGE = "JavaScript">
10 <!--
11 function makeRemote() \{
12         remote = window.open("","remotewin","width=620,height=480,toolbar=no,directories=no,menubar=no,status=yes,location=no,scrollbars=no,resizable=no");
13         remote.location.href = "vibe_main.html";
14         if (remote.opener == null) \{ remote.opener = window; \} 
15         remote.opener.name = "opener";
16 \}
17
18 function testmovie_DoFSCommand(command, args) \{ 
19         if ( command == "call_alert" )
20         \{ 
21                 alert("Here's the Flash message: " + args);
22         \}
23 \}
24 //-->
25
26 </SCRIPT>
27
28 <STYLE type="text/css">
29 <!--
30         A:active \{ color: #FF0000; \}
31         A:visited \{ color: #336699; \}
32         A:link \{ color: #0033FF; \}
33
34         P \{
35                 font-family: arial, helvetica, sans-serif;
36                 color: #666666; 
37         \}
38
39         P EM \{
40                 font-style: italic;
41         \}
42
43         P STRONG \{
44                 font-weight: bold;
45         \}
46
47         H1, H2, H3, H4, H5, H6 \{
48                 font-family: "trebuchet ms", arial,
49                                 helvetica, sans-serif;
50         \}
51         
52 -->
53 </STYLE>
54
55 </HEAD>
56 <BODY TEXT="#666666" LINK="#0033FF" ALINK="#FF0000" BGCOLOR="#FFFFFF">
57
58 <CENTER>
59
60 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="90%" HEIGHT="90%">
61 <TR><TD ALIGN=CENTER VALIGN=MIDDLE>
62         
63         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
64         <TR VALIGN=BOTTOM>
65 <!--yuck, shifts the entire page over.  a larger question is what to do with the viberation stuff - host there?  remove?  nothing?              <TD ALIGN=RIGHT><A HREF="http://www.viberation.com/index.html"><IMG SRC="http://www.viberation.com/graphics/head_left.gif" WIDTH="181" HEIGHT="40" BORDER="0"></A></TD>
66 -->
67 <!-- don't want to steal viberation logo                <TD ALIGN=LEFT><A HREF="http://www.viberation.com/index.html"><IMG SRC="http://www.viberation.com/graphics/head_right_sfba.gif" WIDTH="216" HEIGHT="40" BORDER="0"></A></TD>
68 -->
69         </TR>
70         <TR VALIGN=TOP>
71 <!--            <TD></TD>
72 -->
73                 <TD ALIGN=LEFT NOWRAP>
74                 
75                 &nbsp;<BR>
76                 &nbsp;<BR>
77                 
78 <!-- HEADER END -->
79 <!-- end include -->
80
81
82 { form(); }
83
84 <P>{ warnings(); }</P>
85
86 <P><INPUT TYPE="SUBMIT"><INPUT TYPE="RESET"><BR>
87 <INPUT TYPE="checkbox" NAME="__MAGIC" VALUE="print">show results in printable format</P>
88
89 <TABLE BORDER="1" CELLSPACING="1" CELLPADDING="4">
90         <TR>
91                 <TH WIDTH="70" BGCOLOR="#999999" NOWRAP>Time</TD>
92                 <TH WIDTH="70" BGCOLOR="#999999" NOWRAP>Door</TD>
93                 <TH COLSPAN="2" BGCOLOR="#999999" NOWRAP>Parking</TD>
94                 <TH WIDTH="70" BGCOLOR="#999999" NOWRAP>Time</TD>
95         </TR>
96         <TR>
97                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>9pm - 10pm</TD>
98                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Door 1"); }</TD>
99                 <TD WIDTH="70" ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>{ inputbox("Park 1"); }</TD>
100                 <TD WIDTH="70" ALIGN=LEFT NOWRAP>&nbsp;</TD>
101                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>9pm - 10pm</TD>
102         </TR>
103         <TR>
104                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>10pm - 11pm</TD>
105                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Park 2"); }</TD>
106                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>10pm - 11pm</TD>
107         </TR>
108         <TR>
109                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>11pm - 12am</TD>
110                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Door 2"); }</TD>
111                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Park 3"); }</TD>
112                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>11pm - 12am</TD>
113         </TR>
114         <TR>
115                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>12am - 1am</TD>
116                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Park 4"); }</TD>
117                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>12am - 1am</TD>
118         </TR>
119         <TR>
120                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>1am - 2am</TD>
121                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Door 3"); }</TD>
122                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Park 5"); }</TD>
123                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>1am - 2am</TD>
124         </TR>
125         <TR>
126                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>2am - 3am</TD>
127                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Park 6"); }</TD>
128                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>2am - 3am</TD>
129         </TR>
130         <TR>
131                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>3am - 4am</TD>
132                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Door 5"); }</TD>
133                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Park 7"); }</TD>
134                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>3am - 4am</TD>
135         </TR>
136         <TR>
137                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>4am - 5am</TD>
138                 <TD ROWSPAN="2" BGCOLOR="#CCCCCC" ALIGN=LEFT>{ inputbox("Park 8"); }</TD>
139                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>4am - 5am</TD>
140         </TR>
141         <TR>
142                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>5am - 6am</TD>
143                 <TD ALIGN=LEFT NOWRAP>&nbsp;</TD>
144                 <TD ALIGN=LEFT NOWRAP>&nbsp;</TD>
145                 <TD BGCOLOR="#CCCCCC" ALIGN=LEFT NOWRAP>5am - 6am</TD>
146         </TR>
147 </TABLE>
148
149 </FORM>
150
151
152
153
154 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="400">
155 <TR><TD ALIGN=LEFT VALIGN=TOP>
156
157 <P>Copyright &copy;2000 Adam Gould<BR>
158 Copyright &copy;2000 Michal Migurski<BR>
159 Copyright &copy;2000 Ivan Kohler<BR>
160 All rights reserved.<BR>
161 This program is free software; you can redistribute it and or modify it under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</a> or the <a href="http://www.perl.com/pub/language/misc/Artistic.html">Artistic License</a>.
162 </P>
163
164
165         <P>
166         Above is an example of the Online Staffing Sheet in action. Names can be modified by typing in the fields. Hitting "Submit" automatically updates the storage directory.
167         </P>
168
169         <H2>Download</H2>
170         
171         <P>All relevant files are included in the <A HREF="staff-0.3.tar.gz">staff-0.3.tar.gz</A> archive.</P>
172         <P>You also need the <A HREF="http://search.cpan.org/search?dist=Text-Template">Text::Template</A>, <A HREF="http://search.cpan.org/search?dist=MailTools">MailTools</A> and <A HREF="http://search.cpan.org/search?dist=TimeDate">TimeDate</A> perl modules.  (<a href="http://www.perl.com/CPAN/doc/manual/html/lib/CPAN.html">CPAN</a> will query, download and build perl modules automatically)
173
174
175         <H2>Configuration</H2>
176         
177         <P>
178         Configuring the staffing sheet is easy.
179         </P>
180         
181         <P>
182         <STRONG>Front-end</STRONG> changes can be made to the <A        HREF="table.html">table.html</A> file, which stores the layout of the staffing sheet and is     used to generate the database file. The table.html file uses some non-standard tags:
183         <UL>
184                 <LI><CODE>\{&nbsp;form();&nbsp;\}</CODE><BR>
185                         Use this tag to start your form instead of the HTML <CODE>&lt;FORM&gt;</CODE> tag.  (You should end the form with the normal <CODE>&lt;/FORM&gt;</CODE> tag.)
186                 <LI><CODE>\{&nbsp;inputbox("<i>shift</i>");&nbsp;\}</CODE><BR>
187                         This tag specifies the name of a workshift, as in       <CODE>\{&nbsp;inputbox("Door 1");&nbsp;\}</CODE>. The text enclosed in the tag is used as the workshift name, and is used to generate FORM INPUT fields by the shift.cgi program.  Characters allowed within the tag include spaces, digits, and letters; however the tag cannot begin or end with a space.  To ensure trouble-free use, please keep the tag on <STRONG>ONE</STRONG> line.  For an example of intended use, check the source of <A HREF="table.html">table.html</A>.
188                 <LI><CODE>\{&nbsp;warnings();&nbsp;\}</CODE><BR>
189                         If, during the time between when you load the form and when you submit your changes, one of the fields you are changing has been changed by someone else, your changes will not be accepted and a warning will be issued next to the input box for that field.  You can use the <CODE>\{&nbsp;warnings();&nbsp;\}</CODE> tag to return a list of all warnings, so that you can locate them prominantly on the resulting page.
190                 <LI>Note: old-style <CODE>&lt;WORKSHIFT&gt;<i>shift</i>&lt;/WORKSHIFT&gt;</CODE> tags can be converted to \{&nbsp;inputbox("<i>shift</i>");&nbsp;\} tags with the convert-template.pl program: <CODE>./convert-template.pl&nbsp;old-table-file.html&nbsp;>new-table-file.html</CODE>.
191         </UL>
192         Other than these tags, anything goes. You can include tables, various types of text formatting, and anything else not covered by the above restrictions.  If you need to use the <STRONG>\{</STRONG> or <STRONG>\}</STRONG> characters (the curly braces), you must preceed them with a <STRONG>\</STRONG> (backslash).  See the <A HREF="http://search.cpan.org/doc/MJD/Text-Template-1.23/Template.pm">Text::Template</A> documentation for details on the substitution language.
193         </P>
194         
195         <P>
196         <STRONG>Back-end</STRONG> configuration involves editing a few lines in the     <STRONG>shift.cgi</STRONG> file. The <CODE>$template_file</CODE> variable must be set to the full path and name of the front-end table.html file.  The <CODE>$data_directory</CODE> must be set to the full path and name of a directory where the data will be stored.  If you want to enable the optional mail-notification feature (will send email to anyone who has their shift replaced if they included an email address), set the <CODE>$mail_smtpserver</CODE> variable to the name of an SMTP server which will relay your messages, set the <CODE>$mail_from</CODE> variable to the address you wish to appear in the From:, Sender: and Reply-To: headers, set the <CODE>$mail_subject</CODE> variable to the subject you wish to appear in the Subject: header, set the <CODE>@mail_cc</CODE> variable to any addresses you wish Cc:'ed, and set the <CODE>$mail_footer</CODE> variable to a message which will appear at the bottom of all warning messages.<BR>
197 <PRE>###
198 # user-servicable parts
199 ###
200
201 $template_file = '/home/ivan/staffsheet/table.html';
202 $data_directory = '/home/ivan/staffsheet/data';
203 $mail_smtpserver = 'localhost'; # set blank to disable
204 $mail_from = 'ivan-misconfigured-shift-from@420.am';
205 $mail_subject = 'Your shift has been replaced';
206 @mail_cc = (
207   'ivan-misconfigured-shift-cc@420.am',
208   'ivan-misconfigured-shift-cc2@420.am',
209 );
210 $mail_footer = &lt;&lt;END;
211
212 Sorry, I don't have any more information.  The person who installed the 
213 staff sheet didn't customize this message.
214
215 END
216
217 ###
218 # end of user-servicable parts
219 ###
220 </PRE>
221         
222         <H2>Use</H2>
223         
224         <P>
225         To use the files, install <STRONG>shift.cgi</STRONG> in a public web    directory as a CGI program.  (probably by placing it in a <A HREF="http://www.apache.org/docs/mod/mod_alias.html#scriptalias">cgi-bin</A> directory or using <A HREF="http://www.apache.org/docs/mod/mod_mime.html#addhandler">AddHandler</A>).  Permissions for all files must be set correctly. To make the <STRONG>shift.cgi</STRONG>        excecutable, set its permissions to 755 (<CODE>rwxr-xr-x</CODE>):<BR>
226         <PRE>chmod 755 shift.cgi</PRE><BR>
227         To create the the data directory:<BR>
228         <PRE>mkdir /path/to/data_dir</PRE><BR>
229         The data directory needs to be writable by the user executing the CGI.  It's probably best to simply make the data directory owned by the user as which <STRONG>shift.cgi</STRONG> runs (probably the <A HREF=http://www.apache.org/docs/mod/core.html#user>user as which the web server answers requests</A>, unless you are using <A HREF="http://www.apache.org/docs/suexec.html">suEXEC</A>), and set its permissions to 755:<BR>
230         <PRE>chown httpd /path/to/data_dir
231 chmod 755 /path/to/data_dir</PRE>
232         </P>
233
234         <H2>Help</H2>
235         
236         <P>
237
238         </P>
239         <ul>
240 <!--
241         <li><a href="search-list-archive.html">Search</a> or <a href="list-archive">browse</a> the user mailing list archive.
242 -->
243           <li>Subscribe to the user mailing list by sending a blank message to <a href="mailto:stafflist-user-subscribe@420.am">stafflist-user-subscribe@420.am</a>.
244         </ul>
245         <H2>Development</H2>
246
247         <ul>
248           <li>Anonymous CVS access:<BR>CVSROOT is <B>:pserver:anonymous@cleanwhisker.420.am:/home/cvs/cvsroot</B><BR>The password for the user <B>anonymous</B> is <B>anonymous</B>.<BR>The module name is <B>staff</B>.<BR>So to check out the current tree, you would do (bash):<BR>
249 <PRE>$ export CVSROOT=":pserver:anonymous@cleanwhisker.420.am:/home/cvs/cvsroot"
250 $ cvs login
251 (Logging in to anonymous@cleanwhisker.420.am)
252 CVS password:
253 $ cvs checkout staff
254 </PRE>
255           <li>Browse the CVS tree online via <a href="/cgi-bin/cvsweb/staff">cvsweb</a>.
256 <!--
257           <li><a href="search-devel-list-archive.html">Search</a> or <a href="devel-list-archive">browse</a> the development list archive.
258 -->
259           <li>Subscribe to the development mailing list by sending a blank message to <a href="mailto:stafflist-devel-subscribe@420.am">stafflist-devel-subscribe@420.am</a>.
260         </ul>
261
262
263
264 </TD></TR>
265 </TABLE>
266
267
268 <!-- #include "footer.incl" -->
269 <!-- FOOTER BEGIN -->
270
271 <!--            &nbsp;ÇBRÈ
272                 &nbsp;ÇBRÈ
273
274                 ÇPÈ
275                 ÇA HREF="index.html"ÈHome.Ç/AÈ
276                 Ç/PÈ -->
277                 
278                 </TD>
279         </TR>
280         </TABLE>
281 </TD></TR>
282 </TABLE>
283
284 </CENTER>
285
286 </BODY>
287 </HTML>
288
289 <!-- FOOTER END -->
290 <!-- end include -->