0000: 2f 2a 0a 2a 2a 20 43 6f 70 79 72 69 67 68 74 20 /*.** Copyright
0010: 28 63 29 20 32 30 30 36 2c 32 30 30 37 20 44 2e (c) 2006,2007 D.
0020: 20 52 69 63 68 61 72 64 20 48 69 70 70 0a 2a 2a Richard Hipp.**
0030: 0a 2a 2a 20 54 68 69 73 20 70 72 6f 67 72 61 6d .** This program
0040: 20 69 73 20 66 72 65 65 20 73 6f 66 74 77 61 72 is free softwar
0050: 65 3b 20 79 6f 75 20 63 61 6e 20 72 65 64 69 73 e; you can redis
0060: 74 72 69 62 75 74 65 20 69 74 20 61 6e 64 2f 6f tribute it and/o
0070: 72 0a 2a 2a 20 6d 6f 64 69 66 79 20 69 74 20 75 r.** modify it u
0080: 6e 64 65 72 20 74 68 65 20 74 65 72 6d 73 20 6f nder the terms o
0090: 66 20 74 68 65 20 47 4e 55 20 47 65 6e 65 72 61 f the GNU Genera
00a0: 6c 20 50 75 62 6c 69 63 0a 2a 2a 20 4c 69 63 65 l Public.** Lice
00b0: 6e 73 65 20 76 65 72 73 69 6f 6e 20 32 20 61 73 nse version 2 as
00c0: 20 70 75 62 6c 69 73 68 65 64 20 62 79 20 74 68 published by th
00d0: 65 20 46 72 65 65 20 53 6f 66 74 77 61 72 65 20 e Free Software
00e0: 46 6f 75 6e 64 61 74 69 6f 6e 2e 0a 2a 2a 0a 2a Foundation..**.*
00f0: 2a 20 54 68 69 73 20 70 72 6f 67 72 61 6d 20 69 * This program i
0100: 73 20 64 69 73 74 72 69 62 75 74 65 64 20 69 6e s distributed in
0110: 20 74 68 65 20 68 6f 70 65 20 74 68 61 74 20 69 the hope that i
0120: 74 20 77 69 6c 6c 20 62 65 20 75 73 65 66 75 6c t will be useful
0130: 2c 0a 2a 2a 20 62 75 74 20 57 49 54 48 4f 55 54 ,.** but WITHOUT
0140: 20 41 4e 59 20 57 41 52 52 41 4e 54 59 3b 20 77 ANY WARRANTY; w
0150: 69 74 68 6f 75 74 20 65 76 65 6e 20 74 68 65 20 ithout even the
0160: 69 6d 70 6c 69 65 64 20 77 61 72 72 61 6e 74 79 implied warranty
0170: 20 6f 66 0a 2a 2a 20 4d 45 52 43 48 41 4e 54 41 of.** MERCHANTA
0180: 42 49 4c 49 54 59 20 6f 72 20 46 49 54 4e 45 53 BILITY or FITNES
0190: 53 20 46 4f 52 20 41 20 50 41 52 54 49 43 55 4c S FOR A PARTICUL
01a0: 41 52 20 50 55 52 50 4f 53 45 2e 20 20 53 65 65 AR PURPOSE. See
01b0: 20 74 68 65 20 47 4e 55 0a 2a 2a 20 47 65 6e 65 the GNU.** Gene
01c0: 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e ral Public Licen
01d0: 73 65 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 se for more deta
01e0: 69 6c 73 2e 0a 2a 2a 0a 2a 2a 20 59 6f 75 20 73 ils..**.** You s
01f0: 68 6f 75 6c 64 20 68 61 76 65 20 72 65 63 65 69 hould have recei
0200: 76 65 64 20 61 20 63 6f 70 79 20 6f 66 20 74 68 ved a copy of th
0210: 65 20 47 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 e GNU General Pu
0220: 62 6c 69 63 0a 2a 2a 20 4c 69 63 65 6e 73 65 20 blic.** License
0230: 61 6c 6f 6e 67 20 77 69 74 68 20 74 68 69 73 20 along with this
0240: 6c 69 62 72 61 72 79 3b 20 69 66 20 6e 6f 74 2c library; if not,
0250: 20 77 72 69 74 65 20 74 6f 20 74 68 65 0a 2a 2a write to the.**
0260: 20 46 72 65 65 20 53 6f 66 74 77 61 72 65 20 46 Free Software F
0270: 6f 75 6e 64 61 74 69 6f 6e 2c 20 49 6e 63 2e 2c oundation, Inc.,
0280: 20 35 39 20 54 65 6d 70 6c 65 20 50 6c 61 63 65 59 Temple Place
0290: 20 2d 20 53 75 69 74 65 20 33 33 30 2c 0a 2a 2a - Suite 330,.**
02a0: 20 42 6f 73 74 6f 6e 2c 20 4d 41 20 20 30 32 31 Boston, MA 021
02b0: 31 31 2d 31 33 30 37 2c 20 55 53 41 2e 0a 2a 2a 11-1307, USA..**
02c0: 0a 2a 2a 20 41 75 74 68 6f 72 20 63 6f 6e 74 61 .** Author conta
02d0: 63 74 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 3a 0a ct information:.
02e0: 2a 2a 20 20 20 64 72 68 40 68 77 61 63 69 2e 63 ** drh@hwaci.c
02f0: 6f 6d 0a 2a 2a 20 20 20 68 74 74 70 3a 2f 2f 77 om.** http://w
0300: 77 77 2e 68 77 61 63 69 2e 63 6f 6d 2f 64 72 68 ww.hwaci.com/drh
0310: 2f 0a 2a 2a 0a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a /.**.***********
0320: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0330: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0340: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0350: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0360: 2a 2a 2a 2a 0a 2a 2a 0a 2a 2a 20 54 68 69 73 20 ****.**.** This
0370: 66 69 6c 65 20 63 6f 6e 74 61 69 6e 73 20 63 6f file contains co
0380: 64 65 20 74 6f 20 69 6d 70 6c 65 6d 65 6e 74 20 de to implement
0390: 74 68 65 20 62 61 73 69 63 20 77 65 62 20 70 61 the basic web pa
03a0: 67 65 20 6c 6f 6f 6b 20 61 6e 64 20 66 65 65 6c ge look and feel
03b0: 2e 0a 2a 2a 0a 2a 2f 0a 23 69 6e 63 6c 75 64 65 ..**.*/.#include
03c0: 20 22 63 6f 6e 66 69 67 2e 68 22 0a 23 69 6e 63 "config.h".#inc
03d0: 6c 75 64 65 20 22 73 74 79 6c 65 2e 68 22 0a 0a lude "style.h"..
03e0: 0a 2f 2a 0a 2a 2a 20 45 6c 65 6d 65 6e 74 73 20 ./*.** Elements
03f0: 6f 66 20 74 68 65 20 73 75 62 6d 65 6e 75 20 61 of the submenu a
0400: 72 65 20 63 6f 6c 6c 65 63 74 65 64 20 69 6e 74 re collected int
0410: 6f 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 0a o the following.
0420: 2a 2a 20 73 74 72 75 63 74 75 72 65 20 61 6e 64 ** structure and
0430: 20 64 69 73 70 6c 61 79 65 64 20 62 65 6c 6f 77 displayed below
0440: 20 74 68 65 20 6d 61 69 6e 20 6d 65 6e 75 20 62 the main menu b
0450: 79 20 73 74 79 6c 65 5f 68 65 61 64 65 72 28 29 y style_header()
0460: 2e 0a 2a 2a 0a 2a 2a 20 50 6f 70 75 6c 61 74 65 ..**.** Populate
0470: 20 74 68 69 73 20 73 74 72 75 63 74 75 72 65 20 this structure
0480: 77 69 74 68 20 63 61 6c 6c 73 20 74 6f 20 73 74 with calls to st
0490: 79 6c 65 5f 73 75 62 6d 65 6e 75 5f 65 6c 65 6d yle_submenu_elem
04a0: 65 6e 74 28 29 0a 2a 2a 20 70 72 69 6f 72 20 74 ent().** prior t
04b0: 6f 20 63 61 6c 6c 69 6e 67 20 73 74 79 6c 65 5f o calling style_
04c0: 68 65 61 64 65 72 28 29 2e 0a 2a 2f 0a 73 74 61 header()..*/.sta
04d0: 74 69 63 20 73 74 72 75 63 74 20 53 75 62 6d 65 tic struct Subme
04e0: 6e 75 20 7b 0a 20 20 63 6f 6e 73 74 20 63 68 61 nu {. const cha
04f0: 72 20 2a 7a 4c 61 62 65 6c 3b 0a 20 20 63 6f 6e r *zLabel;. con
0500: 73 74 20 63 68 61 72 20 2a 7a 54 69 74 6c 65 3b st char *zTitle;
0510: 0a 20 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 7a . const char *z
0520: 4c 69 6e 6b 3b 0a 7d 20 61 53 75 62 6d 65 6e 75 Link;.} aSubmenu
0530: 5b 33 30 5d 3b 0a 73 74 61 74 69 63 20 69 6e 74 [30];.static int
0540: 20 6e 53 75 62 6d 65 6e 75 20 3d 20 30 3b 0a 0a nSubmenu = 0;..
0550: 2f 2a 0a 2a 2a 20 52 65 6d 65 6d 62 65 72 20 74 /*.** Remember t
0560: 68 61 74 20 74 68 65 20 68 65 61 64 65 72 20 68 hat the header h
0570: 61 73 20 62 65 65 6e 20 67 65 6e 65 72 61 74 65 as been generate
0580: 64 2e 20 20 54 68 65 20 66 6f 6f 74 65 72 20 69 d. The footer i
0590: 73 20 6f 6d 69 74 74 65 64 0a 2a 2a 20 69 66 20 s omitted.** if
05a0: 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 an error occurs
05b0: 62 65 66 6f 72 65 20 74 68 65 20 68 65 61 64 65 before the heade
05c0: 72 2e 0a 2a 2f 0a 73 74 61 74 69 63 20 69 6e 74 r..*/.static int
05d0: 20 68 65 61 64 65 72 48 61 73 42 65 65 6e 47 65 headerHasBeenGe
05e0: 6e 65 72 61 74 65 64 20 3d 20 30 3b 0a 0a 2f 2a nerated = 0;../*
05f0: 0a 2a 2a 20 41 64 64 20 61 20 6e 65 77 20 65 6c .** Add a new el
0600: 65 6d 65 6e 74 20 74 6f 20 74 68 65 20 73 75 62 ement to the sub
0610: 6d 65 6e 75 0a 2a 2f 0a 76 6f 69 64 20 73 74 79 menu.*/.void sty
0620: 6c 65 5f 73 75 62 6d 65 6e 75 5f 65 6c 65 6d 65 le_submenu_eleme
0630: 6e 74 28 0a 20 20 63 6f 6e 73 74 20 63 68 61 72 nt(. const char
0640: 20 2a 7a 4c 61 62 65 6c 2c 0a 20 20 63 6f 6e 73 *zLabel,. cons
0650: 74 20 63 68 61 72 20 2a 7a 54 69 74 6c 65 2c 0a t char *zTitle,.
0660: 20 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 7a 4c const char *zL
0670: 69 6e 6b 2c 0a 20 20 2e 2e 2e 0a 29 7b 0a 20 20 ink,. ....){.
0680: 76 61 5f 6c 69 73 74 20 61 70 3b 0a 20 20 61 73 va_list ap;. as
0690: 73 65 72 74 28 20 6e 53 75 62 6d 65 6e 75 20 3c sert( nSubmenu <
06a0: 20 73 69 7a 65 6f 66 28 61 53 75 62 6d 65 6e 75 sizeof(aSubmenu
06b0: 29 2f 73 69 7a 65 6f 66 28 61 53 75 62 6d 65 6e )/sizeof(aSubmen
06c0: 75 5b 30 5d 29 20 29 3b 0a 20 20 61 53 75 62 6d u[0]) );. aSubm
06d0: 65 6e 75 5b 6e 53 75 62 6d 65 6e 75 5d 2e 7a 4c enu[nSubmenu].zL
06e0: 61 62 65 6c 20 3d 20 7a 4c 61 62 65 6c 3b 0a 20 abel = zLabel;.
06f0: 20 61 53 75 62 6d 65 6e 75 5b 6e 53 75 62 6d 65 aSubmenu[nSubme
0700: 6e 75 5d 2e 7a 54 69 74 6c 65 20 3d 20 7a 54 69 nu].zTitle = zTi
0710: 74 6c 65 3b 0a 20 20 76 61 5f 73 74 61 72 74 28 tle;. va_start(
0720: 61 70 2c 20 7a 4c 69 6e 6b 29 3b 0a 20 20 61 53 ap, zLink);. aS
0730: 75 62 6d 65 6e 75 5b 6e 53 75 62 6d 65 6e 75 5d ubmenu[nSubmenu]
0740: 2e 7a 4c 69 6e 6b 20 3d 20 76 6d 70 72 69 6e 74 .zLink = vmprint
0750: 66 28 7a 4c 69 6e 6b 2c 20 61 70 29 3b 0a 20 20 f(zLink, ap);.
0760: 76 61 5f 65 6e 64 28 61 70 29 3b 0a 20 20 6e 53 va_end(ap);. nS
0770: 75 62 6d 65 6e 75 2b 2b 3b 0a 7d 0a 0a 2f 2a 0a ubmenu++;.}../*.
0780: 2a 2a 20 43 6f 6d 70 61 72 65 20 74 77 6f 20 73 ** Compare two s
0790: 75 62 6d 65 6e 75 20 69 74 65 6d 73 20 66 6f 72 ubmenu items for
07a0: 20 73 6f 72 74 69 6e 67 20 70 75 72 70 6f 73 65 sorting purpose
07b0: 73 0a 2a 2f 0a 73 74 61 74 69 63 20 69 6e 74 20 s.*/.static int
07c0: 73 75 62 6d 65 6e 75 43 6f 6d 70 61 72 65 28 63 submenuCompare(c
07d0: 6f 6e 73 74 20 76 6f 69 64 20 2a 61 2c 20 63 6f onst void *a, co
07e0: 6e 73 74 20 76 6f 69 64 20 2a 62 29 7b 0a 20 20 nst void *b){.
07f0: 63 6f 6e 73 74 20 73 74 72 75 63 74 20 53 75 62 const struct Sub
0800: 6d 65 6e 75 20 2a 41 20 3d 20 28 63 6f 6e 73 74 menu *A = (const
0810: 20 73 74 72 75 63 74 20 53 75 62 6d 65 6e 75 2a struct Submenu*
0820: 29 61 3b 0a 20 20 63 6f 6e 73 74 20 73 74 72 75 )a;. const stru
0830: 63 74 20 53 75 62 6d 65 6e 75 20 2a 42 20 3d 20 ct Submenu *B =
0840: 28 63 6f 6e 73 74 20 73 74 72 75 63 74 20 53 75 (const struct Su
0850: 62 6d 65 6e 75 2a 29 62 3b 0a 20 20 72 65 74 75 bmenu*)b;. retu
0860: 72 6e 20 73 74 72 63 6d 70 28 41 2d 3e 7a 4c 61 rn strcmp(A->zLa
0870: 62 65 6c 2c 20 42 2d 3e 7a 4c 61 62 65 6c 29 3b bel, B->zLabel);
0880: 0a 7d 0a 0a 2f 2a 0a 2a 2a 20 44 72 61 77 20 74 .}../*.** Draw t
0890: 68 65 20 68 65 61 64 65 72 2e 0a 2a 2f 0a 76 6f he header..*/.vo
08a0: 69 64 20 73 74 79 6c 65 5f 68 65 61 64 65 72 28 id style_header(
08b0: 63 6f 6e 73 74 20 63 68 61 72 20 2a 7a 54 69 74 const char *zTit
08c0: 6c 65 46 6f 72 6d 61 74 2c 20 2e 2e 2e 29 7b 0a leFormat, ...){.
08d0: 20 20 76 61 5f 6c 69 73 74 20 61 70 3b 0a 20 20 va_list ap;.
08e0: 63 68 61 72 20 2a 7a 54 69 74 6c 65 3b 0a 20 20 char *zTitle;.
08f0: 63 6f 6e 73 74 20 63 68 61 72 20 2a 7a 48 65 61 const char *zHea
0900: 64 65 72 20 3d 20 64 62 5f 67 65 74 28 22 68 65 der = db_get("he
0910: 61 64 65 72 22 2c 20 28 63 68 61 72 2a 29 7a 44 ader", (char*)zD
0920: 65 66 61 75 6c 74 48 65 61 64 65 72 29 3b 20 20 efaultHeader);
0930: 0a 20 20 6c 6f 67 69 6e 5f 63 68 65 63 6b 5f 63 . login_check_c
0940: 72 65 64 65 6e 74 69 61 6c 73 28 29 3b 0a 0a 20 redentials();..
0950: 20 76 61 5f 73 74 61 72 74 28 61 70 2c 20 7a 54 va_start(ap, zT
0960: 69 74 6c 65 46 6f 72 6d 61 74 29 3b 0a 20 20 7a itleFormat);. z
0970: 54 69 74 6c 65 20 3d 20 76 6d 70 72 69 6e 74 66 Title = vmprintf
0980: 28 7a 54 69 74 6c 65 46 6f 72 6d 61 74 2c 20 61 (zTitleFormat, a
0990: 70 29 3b 0a 20 20 76 61 5f 65 6e 64 28 61 70 29 p);. va_end(ap)
09a0: 3b 0a 20 20 0a 20 20 63 67 69 5f 64 65 73 74 69 ;. . cgi_desti
09b0: 6e 61 74 69 6f 6e 28 43 47 49 5f 48 45 41 44 45 nation(CGI_HEADE
09c0: 52 29 3b 0a 20 20 0a 20 20 69 66 28 20 67 2e 74 R);. . if( g.t
09d0: 68 54 72 61 63 65 20 29 20 54 68 5f 54 72 61 63 hTrace ) Th_Trac
09e0: 65 28 22 42 45 47 49 4e 5f 48 45 41 44 45 52 3c e("BEGIN_HEADER<
09f0: 62 72 20 2f 3e 5c 6e 22 2c 20 2d 31 29 3b 0a 0a br />\n", -1);..
0a00: 20 20 2f 2a 20 47 65 6e 65 72 61 74 65 20 74 68 /* Generate th
0a10: 65 20 68 65 61 64 65 72 20 75 70 20 74 68 72 6f e header up thro
0a20: 75 67 68 20 74 68 65 20 6d 61 69 6e 20 6d 65 6e ugh the main men
0a30: 75 20 2a 2f 0a 20 20 54 68 5f 53 74 6f 72 65 28 u */. Th_Store(
0a40: 22 70 72 6f 6a 65 63 74 5f 6e 61 6d 65 22 2c 20 "project_name",
0a50: 64 62 5f 67 65 74 28 22 70 72 6f 6a 65 63 74 2d db_get("project-
0a60: 6e 61 6d 65 22 2c 22 55 6e 6e 61 6d 65 64 20 46 name","Unnamed F
0a70: 6f 73 73 69 6c 20 50 72 6f 6a 65 63 74 22 29 29 ossil Project"))
0a80: 3b 0a 20 20 54 68 5f 53 74 6f 72 65 28 22 74 69 ;. Th_Store("ti
0a90: 74 6c 65 22 2c 20 7a 54 69 74 6c 65 29 3b 0a 20 tle", zTitle);.
0aa0: 20 54 68 5f 53 74 6f 72 65 28 22 62 61 73 65 75 Th_Store("baseu
0ab0: 72 6c 22 2c 20 67 2e 7a 42 61 73 65 55 52 4c 29 rl", g.zBaseURL)
0ac0: 3b 0a 20 20 54 68 5f 53 74 6f 72 65 28 22 69 6e ;. Th_Store("in
0ad0: 64 65 78 5f 70 61 67 65 22 2c 20 64 62 5f 67 65 dex_page", db_ge
0ae0: 74 28 22 69 6e 64 65 78 2d 70 61 67 65 22 2c 22 t("index-page","
0af0: 2f 68 6f 6d 65 22 29 29 3b 0a 20 20 54 68 5f 53 /home"));. Th_S
0b00: 74 6f 72 65 28 22 63 75 72 72 65 6e 74 5f 70 61 tore("current_pa
0b10: 67 65 22 2c 20 67 2e 7a 50 61 74 68 29 3b 0a 20 ge", g.zPath);.
0b20: 20 54 68 5f 53 74 6f 72 65 28 22 6d 61 6e 69 66 Th_Store("manif
0b30: 65 73 74 5f 76 65 72 73 69 6f 6e 22 2c 20 4d 41 est_version", MA
0b40: 4e 49 46 45 53 54 5f 56 45 52 53 49 4f 4e 29 3b NIFEST_VERSION);
0b50: 0a 20 20 54 68 5f 53 74 6f 72 65 28 22 6d 61 6e . Th_Store("man
0b60: 69 66 65 73 74 5f 64 61 74 65 22 2c 20 4d 41 4e ifest_date", MAN
0b70: 49 46 45 53 54 5f 44 41 54 45 29 3b 0a 20 20 69 IFEST_DATE);. i
0b80: 66 28 20 67 2e 7a 4c 6f 67 69 6e 20 29 7b 0a 20 f( g.zLogin ){.
0b90: 20 20 20 54 68 5f 53 74 6f 72 65 28 22 6c 6f 67 Th_Store("log
0ba0: 69 6e 22 2c 20 67 2e 7a 4c 6f 67 69 6e 29 3b 0a in", g.zLogin);.
0bb0: 20 20 7d 0a 20 20 69 66 28 20 67 2e 74 68 54 72 }. if( g.thTr
0bc0: 61 63 65 20 29 20 54 68 5f 54 72 61 63 65 28 22 ace ) Th_Trace("
0bd0: 42 45 47 49 4e 5f 48 45 41 44 45 52 5f 53 43 52 BEGIN_HEADER_SCR
0be0: 49 50 54 3c 62 72 20 2f 3e 5c 6e 22 2c 20 2d 31 IPT<br />\n", -1
0bf0: 29 3b 0a 20 20 54 68 5f 52 65 6e 64 65 72 28 7a );. Th_Render(z
0c00: 48 65 61 64 65 72 29 3b 0a 20 20 69 66 28 20 67 Header);. if( g
0c10: 2e 74 68 54 72 61 63 65 20 29 20 54 68 5f 54 72 .thTrace ) Th_Tr
0c20: 61 63 65 28 22 45 4e 44 5f 48 45 41 44 45 52 3c ace("END_HEADER<
0c30: 62 72 20 2f 3e 5c 6e 22 2c 20 2d 31 29 3b 0a 20 br />\n", -1);.
0c40: 20 54 68 5f 55 6e 73 74 6f 72 65 28 22 74 69 74 Th_Unstore("tit
0c50: 6c 65 22 29 3b 20 20 20 2f 2a 20 41 76 6f 69 64 le"); /* Avoid
0c60: 20 63 6f 6c 6c 69 73 69 6f 6e 73 20 77 69 74 68 collisions with
0c70: 20 74 69 63 6b 65 74 20 66 69 65 6c 64 20 6e 61 ticket field na
0c80: 6d 65 73 20 2a 2f 0a 20 20 63 67 69 5f 64 65 73 mes */. cgi_des
0c90: 74 69 6e 61 74 69 6f 6e 28 43 47 49 5f 42 4f 44 tination(CGI_BOD
0ca0: 59 29 3b 0a 20 20 67 2e 63 67 69 50 61 6e 69 63 Y);. g.cgiPanic
0cb0: 20 3d 20 31 3b 0a 20 20 68 65 61 64 65 72 48 61 = 1;. headerHa
0cc0: 73 42 65 65 6e 47 65 6e 65 72 61 74 65 64 20 3d sBeenGenerated =
0cd0: 20 31 3b 0a 7d 0a 0a 2f 2a 0a 2a 2a 20 44 72 61 1;.}../*.** Dra
0ce0: 77 20 74 68 65 20 66 6f 6f 74 65 72 20 61 74 20 w the footer at
0cf0: 74 68 65 20 62 6f 74 74 6f 6d 20 6f 66 20 74 68 the bottom of th
0d00: 65 20 70 61 67 65 2e 0a 2a 2f 0a 76 6f 69 64 20 e page..*/.void
0d10: 73 74 79 6c 65 5f 66 6f 6f 74 65 72 28 76 6f 69 style_footer(voi
0d20: 64 29 7b 0a 20 20 63 6f 6e 73 74 20 63 68 61 72 d){. const char
0d30: 20 2a 7a 46 6f 6f 74 65 72 3b 0a 0a 20 20 69 66 *zFooter;.. if
0d40: 28 20 21 68 65 61 64 65 72 48 61 73 42 65 65 6e ( !headerHasBeen
0d50: 47 65 6e 65 72 61 74 65 64 20 29 20 72 65 74 75 Generated ) retu
0d60: 72 6e 3b 0a 20 20 0a 20 20 2f 2a 20 47 6f 20 62 rn;. . /* Go b
0d70: 61 63 6b 20 61 6e 64 20 70 75 74 20 74 68 65 20 ack and put the
0d80: 73 75 62 6d 65 6e 75 20 61 74 20 74 68 65 20 74 submenu at the t
0d90: 6f 70 20 6f 66 20 74 68 65 20 70 61 67 65 2e 20 op of the page.
0da0: 20 57 65 20 64 65 6c 61 79 20 74 68 65 0a 20 20 We delay the.
0db0: 2a 2a 20 63 72 65 61 74 69 6f 6e 20 6f 66 20 74 ** creation of t
0dc0: 68 65 20 73 75 62 6d 65 6e 75 20 75 6e 74 69 6c he submenu until
0dd0: 20 74 68 65 20 65 6e 64 20 73 6f 20 74 68 61 74 the end so that
0de0: 20 77 65 20 63 61 6e 20 61 64 64 20 65 6c 65 6d we can add elem
0df0: 65 6e 74 73 0a 20 20 2a 2a 20 74 6f 20 74 68 65 ents. ** to the
0e00: 20 73 75 62 6d 65 6e 75 20 77 68 69 6c 65 20 67 submenu while g
0e10: 65 6e 65 72 61 74 69 6e 67 20 70 61 67 65 20 74 enerating page t
0e20: 65 78 74 2e 0a 20 20 2a 2f 0a 20 20 63 67 69 5f ext.. */. cgi_
0e30: 64 65 73 74 69 6e 61 74 69 6f 6e 28 43 47 49 5f destination(CGI_
0e40: 48 45 41 44 45 52 29 3b 0a 20 20 69 66 28 20 6e HEADER);. if( n
0e50: 53 75 62 6d 65 6e 75 3e 30 20 29 7b 0a 20 20 20 Submenu>0 ){.
0e60: 20 69 6e 74 20 69 3b 0a 20 20 20 20 40 20 3c 64 int i;. @ <d
0e70: 69 76 20 63 6c 61 73 73 3d 22 73 75 62 6d 65 6e iv class="submen
0e80: 75 22 3e 0a 20 20 20 20 71 73 6f 72 74 28 61 53 u">. qsort(aS
0e90: 75 62 6d 65 6e 75 2c 20 6e 53 75 62 6d 65 6e 75 ubmenu, nSubmenu
0ea0: 2c 20 73 69 7a 65 6f 66 28 61 53 75 62 6d 65 6e , sizeof(aSubmen
0eb0: 75 5b 30 5d 29 2c 20 73 75 62 6d 65 6e 75 43 6f u[0]), submenuCo
0ec0: 6d 70 61 72 65 29 3b 0a 20 20 20 20 66 6f 72 28 mpare);. for(
0ed0: 69 3d 30 3b 20 69 3c 6e 53 75 62 6d 65 6e 75 3b i=0; i<nSubmenu;
0ee0: 20 69 2b 2b 29 7b 0a 20 20 20 20 20 20 73 74 72 i++){. str
0ef0: 75 63 74 20 53 75 62 6d 65 6e 75 20 2a 70 20 3d uct Submenu *p =
0f00: 20 26 61 53 75 62 6d 65 6e 75 5b 69 5d 3b 0a 20 &aSubmenu[i];.
0f10: 20 20 20 20 20 69 66 28 20 70 2d 3e 7a 4c 69 6e if( p->zLin
0f20: 6b 3d 3d 30 20 29 7b 0a 20 20 20 20 20 20 20 20 k==0 ){.
0f30: 40 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6c @ <span class="l
0f40: 61 62 65 6c 22 3e 25 68 28 70 2d 3e 7a 4c 61 62 abel">%h(p->zLab
0f50: 65 6c 29 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 20 el)</span>.
0f60: 20 7d 65 6c 73 65 7b 0a 20 20 20 20 20 20 20 20 }else{.
0f70: 40 20 3c 61 20 63 6c 61 73 73 3d 22 6c 61 62 65 @ <a class="labe
0f80: 6c 22 20 68 72 65 66 3d 22 25 73 28 70 2d 3e 7a l" href="%s(p->z
0f90: 4c 69 6e 6b 29 22 3e 25 68 28 70 2d 3e 7a 4c 61 Link)">%h(p->zLa
0fa0: 62 65 6c 29 3c 2f 61 3e 0a 20 20 20 20 20 20 7d bel)</a>. }
0fb0: 0a 20 20 20 20 7d 0a 20 20 20 20 40 20 3c 2f 64 . }. @ </d
0fc0: 69 76 3e 0a 20 20 7d 0a 20 20 40 20 3c 64 69 76 iv>. }. @ <div
0fd0: 20 63 6c 61 73 73 3d 22 63 6f 6e 74 65 6e 74 22 class="content"
0fe0: 3e 0a 20 20 63 67 69 5f 64 65 73 74 69 6e 61 74 >. cgi_destinat
0ff0: 69 6f 6e 28 43 47 49 5f 42 4f 44 59 29 3b 0a 0a ion(CGI_BODY);..
1000: 20 20 2f 2a 20 50 75 74 20 74 68 65 20 66 6f 6f /* Put the foo
1010: 74 65 72 20 61 74 20 74 68 65 20 62 6f 74 74 6f ter at the botto
1020: 6d 20 6f 66 20 74 68 65 20 70 61 67 65 2e 0a 20 m of the page..
1030: 20 2a 2f 0a 20 20 40 20 3c 2f 64 69 76 3e 0a 20 */. @ </div>.
1040: 20 7a 46 6f 6f 74 65 72 20 3d 20 64 62 5f 67 65 zFooter = db_ge
1050: 74 28 22 66 6f 6f 74 65 72 22 2c 20 28 63 68 61 t("footer", (cha
1060: 72 2a 29 7a 44 65 66 61 75 6c 74 46 6f 6f 74 65 r*)zDefaultFoote
1070: 72 29 3b 0a 20 20 69 66 28 20 67 2e 74 68 54 72 r);. if( g.thTr
1080: 61 63 65 20 29 20 54 68 5f 54 72 61 63 65 28 22 ace ) Th_Trace("
1090: 42 45 47 49 4e 5f 46 4f 4f 54 45 52 3c 62 72 20 BEGIN_FOOTER<br
10a0: 2f 3e 5c 6e 22 2c 20 2d 31 29 3b 0a 20 20 54 68 />\n", -1);. Th
10b0: 5f 52 65 6e 64 65 72 28 7a 46 6f 6f 74 65 72 29 _Render(zFooter)
10c0: 3b 0a 20 20 69 66 28 20 67 2e 74 68 54 72 61 63 ;. if( g.thTrac
10d0: 65 20 29 20 54 68 5f 54 72 61 63 65 28 22 45 4e e ) Th_Trace("EN
10e0: 44 5f 46 4f 4f 54 45 52 3c 62 72 20 2f 3e 5c 6e D_FOOTER<br />\n
10f0: 22 2c 20 2d 31 29 3b 0a 20 20 0a 20 20 2f 2a 20 ", -1);. . /*
1100: 52 65 6e 64 65 72 20 74 72 61 63 65 20 6c 6f 67 Render trace log
1110: 20 69 66 20 54 48 31 20 74 72 61 63 69 6e 67 20 if TH1 tracing
1120: 69 73 20 65 6e 61 62 6c 65 64 2e 20 2a 2f 0a 20 is enabled. */.
1130: 20 69 66 28 20 67 2e 74 68 54 72 61 63 65 20 29 if( g.thTrace )
1140: 7b 0a 20 20 20 20 63 67 69 5f 61 70 70 65 6e 64 {. cgi_append
1150: 5f 63 6f 6e 74 65 6e 74 28 22 3c 66 6f 6e 74 20 _content("<font
1160: 63 6f 6c 6f 72 3d 5c 22 72 65 64 5c 22 3e 3c 68 color=\"red\"><h
1170: 72 3e 5c 6e 22 2c 20 2d 31 29 3b 0a 20 20 20 20 r>\n", -1);.
1180: 63 67 69 5f 61 70 70 65 6e 64 5f 63 6f 6e 74 65 cgi_append_conte
1190: 6e 74 28 62 6c 6f 62 5f 73 74 72 28 26 67 2e 74 nt(blob_str(&g.t
11a0: 68 4c 6f 67 29 2c 20 62 6c 6f 62 5f 73 69 7a 65 hLog), blob_size
11b0: 28 26 67 2e 74 68 4c 6f 67 29 29 3b 0a 20 20 20 (&g.thLog));.
11c0: 20 63 67 69 5f 61 70 70 65 6e 64 5f 63 6f 6e 74 cgi_append_cont
11d0: 65 6e 74 28 22 3c 2f 66 6f 6e 74 3e 5c 6e 22 2c ent("</font>\n",
11e0: 20 2d 31 29 3b 0a 20 20 7d 0a 7d 0a 0a 2f 2a 0a -1);. }.}../*.
11f0: 2a 2a 20 42 65 67 69 6e 20 61 20 73 69 64 65 2d ** Begin a side-
1200: 62 6f 78 20 6f 6e 20 74 68 65 20 72 69 67 68 74 box on the right
1210: 2d 68 61 6e 64 20 73 69 64 65 20 6f 66 20 61 20 -hand side of a
1220: 70 61 67 65 2e 20 20 54 68 65 20 74 69 74 6c 65 page. The title
1230: 20 61 6e 64 0a 2a 2a 20 74 68 65 20 77 69 64 74 and.** the widt
1240: 68 20 6f 66 20 74 68 65 20 62 6f 78 20 61 72 65 h of the box are
1250: 20 67 69 76 65 6e 20 61 73 20 61 72 67 75 6d 65 given as argume
1260: 6e 74 73 2e 20 20 54 68 65 20 77 69 64 74 68 20 nts. The width
1270: 69 73 20 75 73 75 61 6c 6c 79 0a 2a 2a 20 61 20 is usually.** a
1280: 70 65 72 63 65 6e 74 61 67 65 20 6f 66 20 74 6f percentage of to
1290: 74 61 6c 20 73 63 72 65 65 6e 20 77 69 64 74 68 tal screen width
12a0: 2e 0a 2a 2f 0a 76 6f 69 64 20 73 74 79 6c 65 5f ..*/.void style_
12b0: 73 69 64 65 62 6f 78 5f 62 65 67 69 6e 28 63 6f sidebox_begin(co
12c0: 6e 73 74 20 63 68 61 72 20 2a 7a 54 69 74 6c 65 nst char *zTitle
12d0: 2c 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 7a 57 , const char *zW
12e0: 69 64 74 68 29 7b 0a 20 20 40 20 3c 74 61 62 6c idth){. @ <tabl
12f0: 65 20 77 69 64 74 68 3d 22 25 73 28 7a 57 69 64 e width="%s(zWid
1300: 74 68 29 22 20 61 6c 69 67 6e 3d 22 72 69 67 68 th)" align="righ
1310: 74 22 20 62 6f 72 64 65 72 3d 22 31 22 20 63 65 t" border="1" ce
1320: 6c 6c 70 61 64 64 69 6e 67 3d 35 0a 20 20 40 20 llpadding=5. @
1330: 20 76 73 70 61 63 65 3d 35 20 68 73 70 61 63 65 vspace=5 hspace
1340: 3d 35 3e 0a 20 20 40 20 3c 74 72 3e 3c 74 64 3e =5>. @ <tr><td>
1350: 0a 20 20 40 20 3c 62 3e 25 68 28 7a 54 69 74 6c . @ <b>%h(zTitl
1360: 65 29 3c 2f 62 3e 0a 7d 0a 0a 2f 2a 20 45 6e 64 e)</b>.}../* End
1370: 20 74 68 65 20 73 69 64 65 2d 62 6f 78 0a 2a 2f the side-box.*/
1380: 0a 76 6f 69 64 20 73 74 79 6c 65 5f 73 69 64 65 .void style_side
1390: 62 6f 78 5f 65 6e 64 28 76 6f 69 64 29 7b 0a 20 box_end(void){.
13a0: 20 40 20 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 @ </td></tr></t
13b0: 61 62 6c 65 3e 0a 7d 0a 0a 2f 2a 20 40 2d 63 6f able>.}../* @-co
13c0: 6d 6d 65 6e 74 3a 20 2f 2f 20 2a 2f 0a 2f 2a 0a mment: // */./*.
13d0: 2a 2a 20 54 68 65 20 64 65 66 61 75 6c 74 20 70 ** The default p
13e0: 61 67 65 20 68 65 61 64 65 72 2e 0a 2a 2f 0a 63 age header..*/.c
13f0: 6f 6e 73 74 20 63 68 61 72 20 7a 44 65 66 61 75 onst char zDefau
1400: 6c 74 48 65 61 64 65 72 5b 5d 20 3d 20 0a 40 20 ltHeader[] = .@
1410: 3c 68 74 6d 6c 3e 0a 40 20 3c 68 65 61 64 3e 0a <html>.@ <head>.
1420: 40 20 3c 74 69 74 6c 65 3e 24 3c 70 72 6f 6a 65 @ <title>$<proje
1430: 63 74 5f 6e 61 6d 65 3e 3a 20 24 3c 74 69 74 6c ct_name>: $<titl
1440: 65 3e 3c 2f 74 69 74 6c 65 3e 0a 40 20 3c 6c 69 e></title>.@ <li
1450: 6e 6b 20 72 65 6c 3d 22 61 6c 74 65 72 6e 61 74 nk rel="alternat
1460: 65 22 20 74 79 70 65 3d 22 61 70 70 6c 69 63 61 e" type="applica
1470: 74 69 6f 6e 2f 72 73 73 2b 78 6d 6c 22 20 74 69 tion/rss+xml" ti
1480: 74 6c 65 3d 22 52 53 53 20 46 65 65 64 22 0a 40 tle="RSS Feed".@
1490: 20 20 20 20 20 20 20 68 72 65 66 3d 22 24 62 61 href="$ba
14a0: 73 65 75 72 6c 2f 74 69 6d 65 6c 69 6e 65 2e 72 seurl/timeline.r
14b0: 73 73 22 3e 0a 40 20 3c 6c 69 6e 6b 20 72 65 6c ss">.@ <link rel
14c0: 3d 22 73 74 79 6c 65 73 68 65 65 74 22 20 68 72 ="stylesheet" hr
14d0: 65 66 3d 22 24 62 61 73 65 75 72 6c 2f 73 74 79 ef="$baseurl/sty
14e0: 6c 65 2e 63 73 73 22 20 74 79 70 65 3d 22 74 65 le.css" type="te
14f0: 78 74 2f 63 73 73 22 0a 40 20 20 20 20 20 20 20 xt/css".@
1500: 6d 65 64 69 61 3d 22 73 63 72 65 65 6e 22 3e 0a media="screen">.
1510: 40 20 3c 2f 68 65 61 64 3e 0a 40 20 3c 62 6f 64 @ </head>.@ <bod
1520: 79 3e 0a 40 20 3c 64 69 76 20 63 6c 61 73 73 3d y>.@ <div class=
1530: 22 68 65 61 64 65 72 22 3e 0a 40 20 20 20 3c 64 "header">.@ <d
1540: 69 76 20 63 6c 61 73 73 3d 22 6c 6f 67 6f 22 3e iv class="logo">
1550: 0a 40 20 20 20 20 20 3c 69 6d 67 20 73 72 63 3d .@ <img src=
1560: 22 2f 6c 6f 67 6f 22 20 61 6c 74 3d 22 6c 6f 67 "/logo" alt="log
1570: 6f 22 3e 0a 40 20 20 20 20 20 3c 62 72 3e 3c 6e o">.@ <br><n
1580: 6f 62 72 3e 24 3c 70 72 6f 6a 65 63 74 5f 6e 61 obr>$<project_na
1590: 6d 65 3e 3c 2f 6e 6f 62 72 3e 0a 40 20 20 20 3c me></nobr>.@ <
15a0: 2f 64 69 76 3e 0a 40 20 20 20 3c 64 69 76 20 63 /div>.@ <div c
15b0: 6c 61 73 73 3d 22 74 69 74 6c 65 22 3e 24 3c 74 lass="title">$<t
15c0: 69 74 6c 65 3e 3c 2f 64 69 76 3e 0a 40 20 20 20 itle></div>.@
15d0: 3c 64 69 76 20 63 6c 61 73 73 3d 22 73 74 61 74 <div class="stat
15e0: 75 73 22 3e 3c 6e 6f 62 72 3e 3c 74 68 31 3e 0a us"><nobr><th1>.
15f0: 40 20 20 20 20 20 20 69 66 20 7b 5b 69 6e 66 6f @ if {[info
1600: 20 65 78 69 73 74 73 20 6c 6f 67 69 6e 5d 7d 20 exists login]}
1610: 7b 0a 40 20 20 20 20 20 20 20 20 70 75 74 73 20 {.@ puts
1620: 22 4c 6f 67 67 65 64 20 69 6e 20 61 73 20 24 6c "Logged in as $l
1630: 6f 67 69 6e 22 0a 40 20 20 20 20 20 20 7d 20 65 ogin".@ } e
1640: 6c 73 65 20 7b 0a 40 20 20 20 20 20 20 20 20 70 lse {.@ p
1650: 75 74 73 20 22 4e 6f 74 20 6c 6f 67 67 65 64 20 uts "Not logged
1660: 69 6e 22 0a 40 20 20 20 20 20 20 7d 0a 40 20 20 in".@ }.@
1670: 20 3c 2f 74 68 31 3e 3c 2f 6e 6f 62 72 3e 3c 2f </th1></nobr></
1680: 64 69 76 3e 0a 40 20 3c 2f 64 69 76 3e 0a 40 20 div>.@ </div>.@
1690: 3c 64 69 76 20 63 6c 61 73 73 3d 22 6d 61 69 6e <div class="main
16a0: 6d 65 6e 75 22 3e 3c 74 68 31 3e 0a 40 20 68 74 menu"><th1>.@ ht
16b0: 6d 6c 20 22 3c 61 20 68 72 65 66 3d 27 24 62 61 ml "<a href='$ba
16c0: 73 65 75 72 6c 24 69 6e 64 65 78 5f 70 61 67 65 seurl$index_page
16d0: 27 3e 48 6f 6d 65 3c 2f 61 3e 20 22 0a 40 20 69 '>Home</a> ".@ i
16e0: 66 20 7b 5b 68 61 73 63 61 70 20 68 5d 7d 20 7b f {[hascap h]} {
16f0: 0a 40 20 20 20 68 74 6d 6c 20 22 3c 61 20 68 72 .@ html "<a hr
1700: 65 66 3d 27 24 62 61 73 65 75 72 6c 2f 64 69 72 ef='$baseurl/dir
1710: 27 3e 46 69 6c 65 73 3c 2f 61 3e 20 22 0a 40 20 '>Files</a> ".@
1720: 7d 0a 40 20 69 66 20 7b 5b 68 61 73 63 61 70 20 }.@ if {[hascap
1730: 6f 5d 7d 20 7b 0a 40 20 20 20 68 74 6d 6c 20 22 o]} {.@ html "
1740: 3c 61 20 68 72 65 66 3d 27 24 62 61 73 65 75 72 <a href='$baseur
1750: 6c 2f 6c 65 61 76 65 73 27 3e 4c 65 61 76 65 73 l/leaves'>Leaves
1760: 3c 2f 61 3e 20 22 0a 40 20 20 20 68 74 6d 6c 20 </a> ".@ html
1770: 22 3c 61 20 68 72 65 66 3d 27 24 62 61 73 65 75 "<a href='$baseu
1780: 72 6c 2f 74 69 6d 65 6c 69 6e 65 27 3e 54 69 6d rl/timeline'>Tim
1790: 65 6c 69 6e 65 3c 2f 61 3e 20 22 0a 40 20 20 20 eline</a> ".@
17a0: 68 74 6d 6c 20 22 3c 61 20 68 72 65 66 3d 27 24 html "<a href='$
17b0: 62 61 73 65 75 72 6c 2f 62 72 6c 69 73 74 27 3e baseurl/brlist'>
17c0: 42 72 61 6e 63 68 65 73 3c 2f 61 3e 20 22 0a 40 Branches</a> ".@
17d0: 20 20 20 68 74 6d 6c 20 22 3c 61 20 68 72 65 66 html "<a href
17e0: 3d 27 24 62 61 73 65 75 72 6c 2f 74 61 67 6c 69 ='$baseurl/tagli
17f0: 73 74 27 3e 54 61 67 73 3c 2f 61 3e 20 22 0a 40 st'>Tags</a> ".@
1800: 20 7d 0a 40 20 69 66 20 7b 5b 68 61 73 63 61 70 }.@ if {[hascap
1810: 20 72 5d 7d 20 7b 0a 40 20 20 20 68 74 6d 6c 20 r]} {.@ html
1820: 22 3c 61 20 68 72 65 66 3d 27 24 62 61 73 65 75 "<a href='$baseu
1830: 72 6c 2f 72 65 70 6f 72 74 6c 69 73 74 27 3e 54 rl/reportlist'>T
1840: 69 63 6b 65 74 73 3c 2f 61 3e 20 22 0a 40 20 7d ickets</a> ".@ }
1850: 0a 40 20 69 66 20 7b 5b 68 61 73 63 61 70 20 6a .@ if {[hascap j
1860: 5d 7d 20 7b 0a 40 20 20 20 68 74 6d 6c 20 22 3c ]} {.@ html "<
1870: 61 20 68 72 65 66 3d 27 24 62 61 73 65 75 72 6c a href='$baseurl
1880: 2f 77 69 6b 69 27 3e 57 69 6b 69 3c 2f 61 3e 20 /wiki'>Wiki</a>
1890: 22 0a 40 20 7d 0a 40 20 69 66 20 7b 5b 68 61 73 ".@ }.@ if {[has
18a0: 63 61 70 20 73 5d 7d 20 7b 0a 40 20 20 20 68 74 cap s]} {.@ ht
18b0: 6d 6c 20 22 3c 61 20 68 72 65 66 3d 27 24 62 61 ml "<a href='$ba
18c0: 73 65 75 72 6c 2f 73 65 74 75 70 27 3e 41 64 6d seurl/setup'>Adm
18d0: 69 6e 3c 2f 61 3e 20 22 0a 40 20 7d 20 65 6c 73 in</a> ".@ } els
18e0: 65 69 66 20 7b 5b 68 61 73 63 61 70 20 61 5d 7d eif {[hascap a]}
18f0: 20 7b 0a 40 20 20 20 68 74 6d 6c 20 22 3c 61 20 {.@ html "<a
1900: 68 72 65 66 3d 27 24 62 61 73 65 75 72 6c 2f 73 href='$baseurl/s
1910: 65 74 75 70 5f 75 6c 69 73 74 27 3e 55 73 65 72 etup_ulist'>User
1920: 73 3c 2f 61 3e 20 22 0a 40 20 7d 0a 40 20 69 66 s</a> ".@ }.@ if
1930: 20 7b 5b 69 6e 66 6f 20 65 78 69 73 74 73 20 6c {[info exists l
1940: 6f 67 69 6e 5d 7d 20 7b 0a 40 20 20 20 68 74 6d ogin]} {.@ htm
1950: 6c 20 22 3c 61 20 68 72 65 66 3d 27 24 62 61 73 l "<a href='$bas
1960: 65 75 72 6c 2f 6c 6f 67 69 6e 27 3e 4c 6f 67 6f eurl/login'>Logo
1970: 75 74 3c 2f 61 3e 20 22 0a 40 20 7d 20 65 6c 73 ut</a> ".@ } els
1980: 65 20 7b 0a 40 20 20 20 68 74 6d 6c 20 22 3c 61 e {.@ html "<a
1990: 20 68 72 65 66 3d 27 24 62 61 73 65 75 72 6c 2f href='$baseurl/
19a0: 6c 6f 67 69 6e 27 3e 4c 6f 67 69 6e 3c 2f 61 3e login'>Login</a>
19b0: 20 22 0a 40 20 7d 0a 40 20 3c 2f 74 68 31 3e 3c ".@ }.@ </th1><
19c0: 2f 64 69 76 3e 0a 3b 0a 0a 2f 2a 0a 2a 2a 20 54 /div>.;../*.** T
19d0: 68 65 20 64 65 66 61 75 6c 74 20 70 61 67 65 20 he default page
19e0: 66 6f 6f 74 65 72 0a 2a 2f 0a 63 6f 6e 73 74 20 footer.*/.const
19f0: 63 68 61 72 20 7a 44 65 66 61 75 6c 74 46 6f 6f char zDefaultFoo
1a00: 74 65 72 5b 5d 20 3d 20 0a 40 20 3c 64 69 76 20 ter[] = .@ <div
1a10: 63 6c 61 73 73 3d 22 66 6f 6f 74 65 72 22 3e 0a class="footer">.
1a20: 40 20 46 6f 73 73 69 6c 20 76 65 72 73 69 6f 6e @ Fossil version
1a30: 20 24 6d 61 6e 69 66 65 73 74 5f 76 65 72 73 69 $manifest_versi
1a40: 6f 6e 20 24 6d 61 6e 69 66 65 73 74 5f 64 61 74 on $manifest_dat
1a50: 65 0a 40 20 3c 2f 64 69 76 3e 0a 40 20 3c 2f 62 e.@ </div>.@ </b
1a60: 6f 64 79 3e 3c 2f 68 74 6d 6c 3e 0a 3b 0a 0a 2f ody></html>.;../
1a70: 2a 0a 2a 2a 20 54 68 65 20 64 65 66 61 75 6c 74 *.** The default
1a80: 20 43 61 73 63 61 64 69 6e 67 20 53 74 79 6c 65 Cascading Style
1a90: 20 53 68 65 65 74 2e 0a 2a 2f 0a 63 6f 6e 73 74 Sheet..*/.const
1aa0: 20 63 68 61 72 20 7a 44 65 66 61 75 6c 74 43 53 char zDefaultCS
1ab0: 53 5b 5d 20 3d 20 0a 40 20 2f 2a 20 47 65 6e 65 S[] = .@ /* Gene
1ac0: 72 61 6c 20 73 65 74 74 69 6e 67 73 20 66 6f 72 ral settings for
1ad0: 20 74 68 65 20 65 6e 74 69 72 65 20 70 61 67 65 the entire page
1ae0: 20 2a 2f 0a 40 20 62 6f 64 79 20 7b 0a 40 20 20 */.@ body {.@
1af0: 20 6d 61 72 67 69 6e 3a 20 30 65 78 20 31 65 78 margin: 0ex 1ex
1b00: 3b 0a 40 20 20 20 70 61 64 64 69 6e 67 3a 20 30 ;.@ padding: 0
1b10: 70 78 3b 0a 40 20 20 20 62 61 63 6b 67 72 6f 75 px;.@ backgrou
1b20: 6e 64 2d 63 6f 6c 6f 72 3a 20 77 68 69 74 65 3b nd-color: white;
1b30: 0a 40 20 20 20 66 6f 6e 74 2d 66 61 6d 69 6c 79 .@ font-family
1b40: 3a 20 22 73 61 6e 73 20 73 65 72 69 66 22 3b 0a : "sans serif";.
1b50: 40 20 7d 0a 40 0a 40 20 2f 2a 20 54 68 65 20 70 @ }.@.@ /* The p
1b60: 72 6f 6a 65 63 74 20 6c 6f 67 6f 20 69 6e 20 74 roject logo in t
1b70: 68 65 20 75 70 70 65 72 20 6c 65 66 74 2d 68 61 he upper left-ha
1b80: 6e 64 20 63 6f 72 6e 65 72 20 6f 66 20 65 61 63 nd corner of eac
1b90: 68 20 70 61 67 65 20 2a 2f 0a 40 20 64 69 76 2e h page */.@ div.
1ba0: 6c 6f 67 6f 20 7b 0a 40 20 20 20 64 69 73 70 6c logo {.@ displ
1bb0: 61 79 3a 20 74 61 62 6c 65 2d 63 65 6c 6c 3b 0a ay: table-cell;.
1bc0: 40 20 20 20 74 65 78 74 2d 61 6c 69 67 6e 3a 20 @ text-align:
1bd0: 63 65 6e 74 65 72 3b 0a 40 20 20 20 76 65 72 74 center;.@ vert
1be0: 69 63 61 6c 2d 61 6c 69 67 6e 3a 20 62 6f 74 74 ical-align: bott
1bf0: 6f 6d 3b 0a 40 20 20 20 66 6f 6e 74 2d 77 65 69 om;.@ font-wei
1c00: 67 68 74 3a 20 62 6f 6c 64 3b 0a 40 20 20 20 63 ght: bold;.@ c
1c10: 6f 6c 6f 72 3a 20 23 35 35 38 31 39 35 3b 0a 40 olor: #558195;.@
1c20: 20 7d 0a 40 0a 40 20 2f 2a 20 54 68 65 20 70 61 }.@.@ /* The pa
1c30: 67 65 20 74 69 74 6c 65 20 63 65 6e 74 65 72 65 ge title centere
1c40: 64 20 61 74 20 74 68 65 20 74 6f 70 20 6f 66 20 d at the top of
1c50: 65 61 63 68 20 70 61 67 65 20 2a 2f 0a 40 20 64 each page */.@ d
1c60: 69 76 2e 74 69 74 6c 65 20 7b 0a 40 20 20 20 64 iv.title {.@ d
1c70: 69 73 70 6c 61 79 3a 20 74 61 62 6c 65 2d 63 65 isplay: table-ce
1c80: 6c 6c 3b 0a 40 20 20 20 66 6f 6e 74 2d 73 69 7a ll;.@ font-siz
1c90: 65 3a 20 32 65 6d 3b 0a 40 20 20 20 66 6f 6e 74 e: 2em;.@ font
1ca0: 2d 77 65 69 67 68 74 3a 20 62 6f 6c 64 3b 0a 40 -weight: bold;.@
1cb0: 20 20 20 74 65 78 74 2d 61 6c 69 67 6e 3a 20 6c text-align: l
1cc0: 65 66 74 3b 0a 40 20 20 20 70 61 64 64 69 6e 67 eft;.@ padding
1cd0: 3a 20 30 20 30 20 30 20 31 65 6d 3b 0a 40 20 20 : 0 0 0 1em;.@
1ce0: 20 63 6f 6c 6f 72 3a 20 23 35 35 38 31 39 35 3b color: #558195;
1cf0: 0a 40 20 20 20 76 65 72 74 69 63 61 6c 2d 61 6c .@ vertical-al
1d00: 69 67 6e 3a 20 62 6f 74 74 6f 6d 3b 0a 40 20 20 ign: bottom;.@
1d10: 20 77 69 64 74 68 3a 20 31 30 30 25 3b 0a 40 20 width: 100%;.@
1d20: 7d 0a 40 0a 40 20 2f 2a 20 54 68 65 20 6c 6f 67 }.@.@ /* The log
1d30: 69 6e 20 73 74 61 74 75 73 20 6d 65 73 73 61 67 in status messag
1d40: 65 20 69 6e 20 74 68 65 20 74 6f 70 20 72 69 67 e in the top rig
1d50: 68 74 2d 68 61 6e 64 20 63 6f 72 6e 65 72 20 2a ht-hand corner *
1d60: 2f 0a 40 20 64 69 76 2e 73 74 61 74 75 73 20 7b /.@ div.status {
1d70: 0a 40 20 20 20 64 69 73 70 6c 61 79 3a 20 74 61 .@ display: ta
1d80: 62 6c 65 2d 63 65 6c 6c 3b 0a 40 20 20 20 74 65 ble-cell;.@ te
1d90: 78 74 2d 61 6c 69 67 6e 3a 20 72 69 67 68 74 3b xt-align: right;
1da0: 0a 40 20 20 20 76 65 72 74 69 63 61 6c 2d 61 6c .@ vertical-al
1db0: 69 67 6e 3a 20 62 6f 74 74 6f 6d 3b 0a 40 20 20 ign: bottom;.@
1dc0: 20 63 6f 6c 6f 72 3a 20 23 35 35 38 31 39 35 3b color: #558195;
1dd0: 0a 40 20 20 20 66 6f 6e 74 2d 73 69 7a 65 3a 20 .@ font-size:
1de0: 30 2e 38 65 6d 3b 0a 40 20 20 20 66 6f 6e 74 2d 0.8em;.@ font-
1df0: 77 65 69 67 68 74 3a 20 62 6f 6c 64 3b 0a 40 20 weight: bold;.@
1e00: 7d 0a 40 0a 40 20 2f 2a 20 54 68 65 20 68 65 61 }.@.@ /* The hea
1e10: 64 65 72 20 61 63 72 6f 73 73 20 74 68 65 20 74 der across the t
1e20: 6f 70 20 6f 66 20 74 68 65 20 70 61 67 65 20 2a op of the page *
1e30: 2f 0a 40 20 64 69 76 2e 68 65 61 64 65 72 20 7b /.@ div.header {
1e40: 0a 40 20 20 20 64 69 73 70 6c 61 79 3a 20 74 61 .@ display: ta
1e50: 62 6c 65 3b 0a 40 20 20 20 77 69 64 74 68 3a 20 ble;.@ width:
1e60: 31 30 30 25 3b 0a 40 20 7d 0a 40 0a 40 20 2f 2a 100%;.@ }.@.@ /*
1e70: 20 54 68 65 20 6d 61 69 6e 20 6d 65 6e 75 20 62 The main menu b
1e80: 61 72 20 74 68 61 74 20 61 70 70 65 61 72 73 20 ar that appears
1e90: 61 74 20 74 68 65 20 74 6f 70 20 6f 66 20 74 68 at the top of th
1ea0: 65 20 70 61 67 65 20 62 65 6e 65 61 74 68 0a 40 e page beneath.@
1eb0: 20 2a 2a 20 74 68 65 20 68 65 61 64 65 72 20 2a ** the header *
1ec0: 2f 0a 40 20 64 69 76 2e 6d 61 69 6e 6d 65 6e 75 /.@ div.mainmenu
1ed0: 20 7b 0a 40 20 20 20 70 61 64 64 69 6e 67 3a 20 {.@ padding:
1ee0: 35 70 78 20 31 30 70 78 20 35 70 78 20 31 30 70 5px 10px 5px 10p
1ef0: 78 3b 0a 40 20 20 20 66 6f 6e 74 2d 73 69 7a 65 x;.@ font-size
1f00: 3a 20 30 2e 39 65 6d 3b 0a 40 20 20 20 66 6f 6e : 0.9em;.@ fon
1f10: 74 2d 77 65 69 67 68 74 3a 20 62 6f 6c 64 3b 0a t-weight: bold;.
1f20: 40 20 20 20 74 65 78 74 2d 61 6c 69 67 6e 3a 20 @ text-align:
1f30: 63 65 6e 74 65 72 3b 0a 40 20 20 20 6c 65 74 74 center;.@ lett
1f40: 65 72 2d 73 70 61 63 69 6e 67 3a 20 31 70 78 3b er-spacing: 1px;
1f50: 0a 40 20 20 20 62 61 63 6b 67 72 6f 75 6e 64 2d .@ background-
1f60: 63 6f 6c 6f 72 3a 20 23 35 35 38 31 39 35 3b 0a color: #558195;.
1f70: 40 20 20 20 63 6f 6c 6f 72 3a 20 77 68 69 74 65 @ color: white
1f80: 3b 0a 40 20 7d 0a 40 0a 40 20 2f 2a 20 54 68 65 ;.@ }.@.@ /* The
1f90: 20 73 75 62 6d 65 6e 75 20 62 61 72 20 74 68 61 submenu bar tha
1fa0: 74 20 2a 73 6f 6d 65 74 69 6d 65 73 2a 20 61 70 t *sometimes* ap
1fb0: 70 65 61 72 73 20 62 65 6c 6f 77 20 74 68 65 20 pears below the
1fc0: 6d 61 69 6e 20 6d 65 6e 75 20 2a 2f 0a 40 20 64 main menu */.@ d
1fd0: 69 76 2e 73 75 62 6d 65 6e 75 20 7b 0a 40 20 20 iv.submenu {.@
1fe0: 20 70 61 64 64 69 6e 67 3a 20 33 70 78 20 31 30 padding: 3px 10
1ff0: 70 78 20 33 70 78 20 30 70 78 3b 0a 40 20 20 20 px 3px 0px;.@
2000: 66 6f 6e 74 2d 73 69 7a 65 3a 20 30 2e 39 65 6d font-size: 0.9em
2010: 3b 0a 40 20 20 20 74 65 78 74 2d 61 6c 69 67 6e ;.@ text-align
2020: 3a 20 63 65 6e 74 65 72 3b 0a 40 20 20 20 62 61 : center;.@ ba
2030: 63 6b 67 72 6f 75 6e 64 2d 63 6f 6c 6f 72 3a 20 ckground-color:
2040: 23 34 35 36 38 37 38 3b 0a 40 20 20 20 63 6f 6c #456878;.@ col
2050: 6f 72 3a 20 77 68 69 74 65 3b 0a 40 20 7d 0a 40 or: white;.@ }.@
2060: 20 64 69 76 2e 6d 61 69 6e 6d 65 6e 75 20 61 2c div.mainmenu a,
2070: 20 64 69 76 2e 6d 61 69 6e 6d 65 6e 75 20 61 3a div.mainmenu a:
2080: 76 69 73 69 74 65 64 2c 20 64 69 76 2e 73 75 62 visited, div.sub
2090: 6d 65 6e 75 20 61 2c 20 64 69 76 2e 73 75 62 6d menu a, div.subm
20a0: 65 6e 75 20 61 3a 76 69 73 69 74 65 64 20 7b 0a enu a:visited {.
20b0: 40 20 20 20 70 61 64 64 69 6e 67 3a 20 33 70 78 @ padding: 3px
20c0: 20 31 30 70 78 20 33 70 78 20 31 30 70 78 3b 0a 10px 3px 10px;.
20d0: 40 20 20 20 63 6f 6c 6f 72 3a 20 77 68 69 74 65 @ color: white
20e0: 3b 0a 40 20 20 20 74 65 78 74 2d 64 65 63 6f 72 ;.@ text-decor
20f0: 61 74 69 6f 6e 3a 20 6e 6f 6e 65 3b 0a 40 20 7d ation: none;.@ }
2100: 0a 40 20 64 69 76 2e 6d 61 69 6e 6d 65 6e 75 20 .@ div.mainmenu
2110: 61 3a 68 6f 76 65 72 2c 20 64 69 76 2e 73 75 62 a:hover, div.sub
2120: 6d 65 6e 75 20 61 3a 68 6f 76 65 72 20 7b 0a 40 menu a:hover {.@
2130: 20 20 20 63 6f 6c 6f 72 3a 20 23 35 35 38 31 39 color: #55819
2140: 35 3b 0a 40 20 20 20 62 61 63 6b 67 72 6f 75 6e 5;.@ backgroun
2150: 64 2d 63 6f 6c 6f 72 3a 20 77 68 69 74 65 3b 0a d-color: white;.
2160: 40 20 7d 0a 40 0a 40 20 2f 2a 20 41 6c 6c 20 70 @ }.@.@ /* All p
2170: 61 67 65 20 63 6f 6e 74 65 6e 74 20 66 72 6f 6d age content from
2180: 20 74 68 65 20 62 6f 74 74 6f 6d 20 6f 66 20 74 the bottom of t
2190: 68 65 20 6d 65 6e 75 20 6f 72 20 73 75 62 6d 65 he menu or subme
21a0: 6e 75 20 64 6f 77 6e 20 74 6f 0a 40 20 2a 2a 20 nu down to.@ **
21b0: 74 68 65 20 66 6f 6f 74 65 72 20 2a 2f 0a 40 20 the footer */.@
21c0: 64 69 76 2e 63 6f 6e 74 65 6e 74 20 7b 0a 40 20 div.content {.@
21d0: 20 20 70 61 64 64 69 6e 67 3a 20 30 65 78 20 31 padding: 0ex 1
21e0: 65 78 20 30 65 78 20 32 65 78 3b 0a 40 20 7d 0a ex 0ex 2ex;.@ }.
21f0: 40 0a 40 20 2f 2a 20 53 6f 6d 65 20 70 61 67 65 @.@ /* Some page
2200: 73 20 68 61 76 65 20 73 65 63 74 69 6f 6e 20 64 s have section d
2210: 69 76 69 64 65 72 73 20 2a 2f 0a 40 20 64 69 76 ividers */.@ div
2220: 2e 73 65 63 74 69 6f 6e 20 7b 0a 40 20 20 20 6d .section {.@ m
2230: 61 72 67 69 6e 2d 62 6f 74 74 6f 6d 3a 20 30 70 argin-bottom: 0p
2240: 78 3b 0a 40 20 20 20 6d 61 72 67 69 6e 2d 74 6f x;.@ margin-to
2250: 70 3a 20 31 65 6d 3b 0a 40 20 20 20 70 61 64 64 p: 1em;.@ padd
2260: 69 6e 67 3a 20 31 70 78 20 31 70 78 20 31 70 78 ing: 1px 1px 1px
2270: 20 31 70 78 3b 0a 40 20 20 20 66 6f 6e 74 2d 73 1px;.@ font-s
2280: 69 7a 65 3a 20 31 2e 32 65 6d 3b 0a 40 20 20 20 ize: 1.2em;.@
2290: 66 6f 6e 74 2d 77 65 69 67 68 74 3a 20 62 6f 6c font-weight: bol
22a0: 64 3b 0a 40 20 20 20 62 61 63 6b 67 72 6f 75 6e d;.@ backgroun
22b0: 64 2d 63 6f 6c 6f 72 3a 20 23 35 35 38 31 39 35 d-color: #558195
22c0: 3b 0a 40 20 20 20 63 6f 6c 6f 72 3a 20 77 68 69 ;.@ color: whi
22d0: 74 65 3b 0a 40 20 7d 0a 40 0a 40 20 2f 2a 20 54 te;.@ }.@.@ /* T
22e0: 68 65 20 22 44 61 74 65 22 20 74 68 61 74 20 6f he "Date" that o
22f0: 63 63 75 72 73 20 6f 6e 20 74 68 65 20 6c 65 66 ccurs on the lef
2300: 74 20 68 61 6e 64 20 73 69 64 65 20 6f 66 20 74 t hand side of t
2310: 69 6d 65 6c 69 6e 65 73 20 2a 2f 0a 40 20 64 69 imelines */.@ di
2320: 76 2e 64 69 76 69 64 65 72 20 7b 0a 40 20 20 20 v.divider {.@
2330: 62 61 63 6b 67 72 6f 75 6e 64 3a 20 23 61 31 63 background: #a1c
2340: 34 64 34 3b 0a 40 20 20 20 62 6f 72 64 65 72 3a 4d4;.@ border:
2350: 20 32 70 78 20 23 35 35 38 31 39 35 20 73 6f 6c 2px #558195 sol
2360: 69 64 3b 0a 40 20 20 20 66 6f 6e 74 2d 73 69 7a id;.@ font-siz
2370: 65 3a 20 31 65 6d 3b 20 66 6f 6e 74 2d 77 65 69 e: 1em; font-wei
2380: 67 68 74 3a 20 6e 6f 72 6d 61 6c 3b 0a 40 20 20 ght: normal;.@
2390: 20 70 61 64 64 69 6e 67 3a 20 2e 32 35 65 6d 3b padding: .25em;
23a0: 0a 40 20 20 20 6d 61 72 67 69 6e 3a 20 2e 32 65 .@ margin: .2e
23b0: 6d 20 30 20 2e 32 65 6d 20 30 3b 0a 40 20 20 20 m 0 .2em 0;.@
23c0: 66 6c 6f 61 74 3a 20 6c 65 66 74 3b 0a 40 20 20 float: left;.@
23d0: 20 63 6c 65 61 72 3a 20 6c 65 66 74 3b 0a 40 20 clear: left;.@
23e0: 7d 0a 40 0a 40 20 2f 2a 20 54 68 65 20 66 6f 6f }.@.@ /* The foo
23f0: 74 65 72 20 61 74 20 74 68 65 20 76 65 72 79 20 ter at the very
2400: 62 6f 74 74 6f 6d 20 6f 66 20 74 68 65 20 70 61 bottom of the pa
2410: 67 65 20 2a 2f 0a 40 20 64 69 76 2e 66 6f 6f 74 ge */.@ div.foot
2420: 65 72 20 7b 0a 40 20 20 20 66 6f 6e 74 2d 73 69 er {.@ font-si
2430: 7a 65 3a 20 30 2e 38 65 6d 3b 0a 40 20 20 20 6d ze: 0.8em;.@ m
2440: 61 72 67 69 6e 2d 74 6f 70 3a 20 31 32 70 78 3b argin-top: 12px;
2450: 0a 40 20 20 20 70 61 64 64 69 6e 67 3a 20 35 70 .@ padding: 5p
2460: 78 20 31 30 70 78 20 35 70 78 20 31 30 70 78 3b x 10px 5px 10px;
2470: 0a 40 20 20 20 74 65 78 74 2d 61 6c 69 67 6e 3a .@ text-align:
2480: 20 72 69 67 68 74 3b 0a 40 20 20 20 62 61 63 6b right;.@ back
2490: 67 72 6f 75 6e 64 2d 63 6f 6c 6f 72 3a 20 23 35 ground-color: #5
24a0: 35 38 31 39 35 3b 0a 40 20 20 20 63 6f 6c 6f 72 58195;.@ color
24b0: 3a 20 77 68 69 74 65 3b 0a 40 20 7d 0a 40 0a 40 : white;.@ }.@.@
24c0: 20 2f 2a 20 4d 61 6b 65 20 74 68 65 20 6c 69 6e /* Make the lin
24d0: 6b 73 20 69 6e 20 74 68 65 20 66 6f 6f 74 65 72 ks in the footer
24e0: 20 6c 65 73 73 20 75 67 6c 79 2e 2e 2e 20 2a 2f less ugly... */
24f0: 0a 40 20 64 69 76 2e 66 6f 6f 74 65 72 20 61 20 .@ div.footer a
2500: 7b 20 63 6f 6c 6f 72 3a 20 77 68 69 74 65 3b 20 { color: white;
2510: 7d 0a 40 20 64 69 76 2e 66 6f 6f 74 65 72 20 61 }.@ div.footer a
2520: 3a 6c 69 6e 6b 20 7b 20 63 6f 6c 6f 72 3a 20 77 :link { color: w
2530: 68 69 74 65 3b 20 7d 0a 40 20 64 69 76 2e 66 6f hite; }.@ div.fo
2540: 6f 74 65 72 20 61 3a 76 69 73 69 74 65 64 20 7b oter a:visited {
2550: 20 63 6f 6c 6f 72 3a 20 77 68 69 74 65 3b 20 7d color: white; }
2560: 0a 40 20 64 69 76 2e 66 6f 6f 74 65 72 20 61 3a .@ div.footer a:
2570: 68 6f 76 65 72 20 7b 20 62 61 63 6b 67 72 6f 75 hover { backgrou
2580: 6e 64 2d 63 6f 6c 6f 72 3a 20 77 68 69 74 65 3b nd-color: white;
2590: 20 63 6f 6c 6f 72 3a 20 23 35 35 38 31 39 35 3b color: #558195;
25a0: 20 7d 0a 40 20 0a 40 20 2f 2a 20 3c 76 65 72 62 }.@ .@ /* <verb
25b0: 61 74 69 6d 3e 20 62 6c 6f 63 6b 73 20 2a 2f 0a atim> blocks */.
25c0: 40 20 70 72 65 2e 76 65 72 62 61 74 69 6d 20 7b @ pre.verbatim {
25d0: 0a 40 20 20 20 20 62 61 63 6b 67 72 6f 75 6e 64 .@ background
25e0: 2d 63 6f 6c 6f 72 3a 20 23 66 35 66 35 66 35 3b -color: #f5f5f5;
25f0: 0a 40 20 20 20 20 70 61 64 64 69 6e 67 3a 20 30 .@ padding: 0
2600: 2e 35 65 6d 3b 0a 40 7d 0a 40 0a 40 20 2f 2a 20 .5em;.@}.@.@ /*
2610: 54 68 65 20 6c 61 62 65 6c 2f 76 61 6c 75 65 20 The label/value
2620: 70 61 69 72 73 20 6f 6e 20 28 66 6f 72 20 65 78 pairs on (for ex
2630: 61 6d 70 6c 65 29 20 74 68 65 20 63 69 20 70 61 ample) the ci pa
2640: 67 65 20 2a 2f 0a 40 20 74 61 62 6c 65 2e 6c 61 ge */.@ table.la
2650: 62 65 6c 2d 76 61 6c 75 65 20 74 68 20 7b 0a 40 bel-value th {.@
2660: 20 20 20 76 65 72 74 69 63 61 6c 2d 61 6c 69 67 vertical-alig
2670: 6e 3a 20 74 6f 70 3b 0a 40 20 20 20 74 65 78 74 n: top;.@ text
2680: 2d 61 6c 69 67 6e 3a 20 72 69 67 68 74 3b 0a 40 -align: right;.@
2690: 20 20 20 70 61 64 64 69 6e 67 3a 20 30 2e 32 65 padding: 0.2e
26a0: 78 20 32 65 78 3b 0a 40 20 7d 0a 40 0a 40 20 2f x 2ex;.@ }.@.@ /
26b0: 2a 20 46 6f 72 20 6d 61 72 6b 69 6e 67 20 69 6d * For marking im
26c0: 70 6f 72 74 61 6e 74 20 55 49 20 65 6c 65 6d 65 portant UI eleme
26d0: 6e 74 73 20 77 68 69 63 68 20 73 68 6f 75 6c 64 nts which should
26e0: 6e 27 74 20 62 65 0a 40 20 20 20 20 6c 69 67 68 n't be.@ ligh
26f0: 74 6c 79 20 64 69 73 6d 69 73 73 65 64 2e 20 49 tly dismissed. I
2700: 20 6d 61 69 6e 6c 79 20 75 73 65 20 69 74 20 74 mainly use it t
2710: 6f 20 6d 61 72 6b 20 22 6e 6f 74 20 79 65 74 0a o mark "not yet.
2720: 40 20 20 20 20 69 6d 70 6c 65 6d 65 6e 74 65 64 @ implemented
2730: 22 20 70 61 72 74 73 20 6f 66 20 61 20 70 61 67 " parts of a pag
2740: 65 2e 20 57 68 65 74 68 65 72 20 6f 72 20 6e 6f e. Whether or no
2750: 74 20 74 6f 20 68 61 76 65 0a 40 20 20 20 20 61 t to have.@ a
2760: 20 27 62 6f 72 64 65 72 27 20 61 74 74 72 69 62 'border' attrib
2770: 75 74 65 20 73 65 74 20 69 73 20 61 72 67 75 61 ute set is argua
2780: 62 6c 65 2e 20 2a 2f 0a 40 20 2e 61 63 68 74 75 ble. */.@ .achtu
2790: 6e 67 20 7b 0a 40 20 20 20 63 6f 6c 6f 72 3a 20 ng {.@ color:
27a0: 23 66 66 30 30 30 30 3b 0a 40 20 20 20 62 61 63 #ff0000;.@ bac
27b0: 6b 67 72 6f 75 6e 64 3a 20 23 66 66 66 66 30 30 kground: #ffff00
27c0: 3b 0a 40 20 20 20 62 6f 72 64 65 72 3a 20 31 70 ;.@ border: 1p
27d0: 78 20 73 6f 6c 69 64 20 23 66 66 30 30 30 30 3b x solid #ff0000;
27e0: 0a 40 20 7d 0a 40 0a 40 20 64 69 76 2e 6d 69 6e .@ }.@.@ div.min
27f0: 69 66 6f 72 6d 20 7b 0a 40 20 20 20 20 20 66 6f iform {.@ fo
2800: 6e 74 2d 73 69 7a 65 3a 20 73 6d 61 6c 6c 65 72 nt-size: smaller
2810: 3b 0a 40 20 20 20 20 20 6d 61 72 67 69 6e 3a 20 ;.@ margin:
2820: 38 70 78 3b 0a 40 20 7d 20 0a 3b 0a 0a 2f 2a 0a 8px;.@ } .;../*.
2830: 2a 2a 20 57 45 42 50 41 47 45 3a 20 73 74 79 6c ** WEBPAGE: styl
2840: 65 2e 63 73 73 0a 2a 2f 0a 76 6f 69 64 20 70 61 e.css.*/.void pa
2850: 67 65 5f 73 74 79 6c 65 5f 63 73 73 28 76 6f 69 ge_style_css(voi
2860: 64 29 7b 0a 20 20 63 68 61 72 20 2a 7a 43 53 53 d){. char *zCSS
2870: 20 3d 20 30 3b 0a 0a 20 20 63 67 69 5f 73 65 74 = 0;.. cgi_set
2880: 5f 63 6f 6e 74 65 6e 74 5f 74 79 70 65 28 22 74 _content_type("t
2890: 65 78 74 2f 63 73 73 22 29 3b 0a 20 20 7a 43 53 ext/css");. zCS
28a0: 53 20 3d 20 64 62 5f 67 65 74 28 22 63 73 73 22 S = db_get("css"
28b0: 2c 28 63 68 61 72 2a 29 7a 44 65 66 61 75 6c 74 ,(char*)zDefault
28c0: 43 53 53 29 3b 0a 20 20 63 67 69 5f 61 70 70 65 CSS);. cgi_appe
28d0: 6e 64 5f 63 6f 6e 74 65 6e 74 28 7a 43 53 53 2c nd_content(zCSS,
28e0: 20 2d 31 29 3b 0a 7d 0a 0a 2f 2a 0a 2a 2a 20 57 -1);.}../*.** W
28f0: 45 42 50 41 47 45 3a 20 74 65 73 74 5f 65 6e 76 EBPAGE: test_env
2900: 0a 2a 2f 0a 76 6f 69 64 20 70 61 67 65 5f 74 65 .*/.void page_te
2910: 73 74 5f 65 6e 76 28 76 6f 69 64 29 7b 0a 20 20 st_env(void){.
2920: 73 74 79 6c 65 5f 68 65 61 64 65 72 28 22 45 6e style_header("En
2930: 76 69 72 6f 6e 6d 65 6e 74 20 54 65 73 74 22 29 vironment Test")
2940: 3b 0a 23 69 66 20 21 64 65 66 69 6e 65 64 28 5f ;.#if !defined(_
2950: 5f 4d 49 4e 47 57 33 32 5f 5f 29 0a 20 20 40 20 _MINGW32__). @
2960: 75 69 64 3d 25 64 28 67 65 74 75 69 64 28 29 29 uid=%d(getuid())
2970: 2c 20 67 69 64 3d 25 64 28 67 65 74 67 69 64 28 , gid=%d(getgid(
2980: 29 29 3c 62 72 3e 0a 23 65 6e 64 69 66 0a 20 20 ))<br>.#endif.
2990: 40 20 67 2e 7a 42 61 73 65 55 52 4c 20 3d 20 25 @ g.zBaseURL = %
29a0: 68 28 67 2e 7a 42 61 73 65 55 52 4c 29 3c 62 72 h(g.zBaseURL)<br
29b0: 3e 0a 20 20 40 20 67 2e 7a 54 6f 70 20 3d 20 25 >. @ g.zTop = %
29c0: 68 28 67 2e 7a 54 6f 70 29 3c 62 72 3e 0a 20 20 h(g.zTop)<br>.
29d0: 63 67 69 5f 70 72 69 6e 74 5f 61 6c 6c 28 29 3b cgi_print_all();
29e0: 0a 20 20 73 74 79 6c 65 5f 66 6f 6f 74 65 72 28 . style_footer(
29f0: 29 3b 0a 7d 0a );.}.