tazpanel view lib/libtazpanel @ rev 32

add doc/ with index.cgi to generate translated help and doc + use absolute path in xHTML and config
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 05 05:51:38 2011 +0200 (2011-04-05)
parents 0f9a95d9ca89
children 1a80f769f6e1
line source
1 #!/bin/sh
2 #
3 # Common functions for TazPanel CGI and cmdline interface
4 #
6 # We need a config file first
7 get_config() {
8 CONFIG="/etc/slitaz/tazpanel.conf"
9 [ -f $CONFIG ] && . $CONFIG
10 [ -f tazpanel.conf ] && . tazpanel.conf
11 [ ! -f $PANEL/lib/libtazpanel ] && \
12 echo "No config file or libtazpanel found: $CONFIG" && \
13 exit 1
14 }
16 #
17 # xHTML 5 (header and footer skel are from the style)
18 #
20 xhtml_header() {
21 cat ${PANEL}$HEADER | sed s/'- %TITLE%'/"$TITLE"/
22 }
24 xhtml_footer() {
25 cat ${PANEL}$FOOTER
26 }
28 table_start() {
29 cat << EOT
30 <table>
31 <tbody>
32 EOT
33 }
35 table_end () {
36 cat << EOT
37 </tbody>
38 </table>
39 EOT
40 }