Showing
42 changed files
with
1496 additions
and
0 deletions
css/style.css
0 → 100644
1 | +BODY { | ||
2 | + background-image: url(../images/page-bg.png); | ||
3 | + background-color: #FFFFFF; | ||
4 | + background-repeat: no-repeat; | ||
5 | + background-attachment: fixed; | ||
6 | + color: #000000; | ||
7 | + font-family: sans-serif; | ||
8 | + font-size: 12pt; } | ||
9 | + | ||
10 | +DIV.headline { | ||
11 | + position: absolute; | ||
12 | + top: 0px; | ||
13 | + left: 0px; | ||
14 | + z-Index: 1; } | ||
15 | + | ||
16 | +DIV.headlineText { | ||
17 | + position: absolute; | ||
18 | + top: 10px; | ||
19 | + left: 15px; | ||
20 | + z-Index: 2; } | ||
21 | + | ||
22 | +H1 { | ||
23 | + font-size: 25pt; | ||
24 | + font-weight: normal; | ||
25 | + margin-top: 0px; } | ||
26 | + | ||
27 | +H2 { | ||
28 | + font-size: 20pt; | ||
29 | + font-weight: normal; | ||
30 | + margin-top: 0px; } | ||
31 | + | ||
32 | +H3 { | ||
33 | + font-size: 15pt; | ||
34 | + font-weight: normal; | ||
35 | + margin-top: 0px; } | ||
36 | + | ||
37 | +H4 { | ||
38 | + font-size: 12pt; | ||
39 | + margin-top: 0px; } | ||
40 | + | ||
41 | +DIV.menuItem { | ||
42 | + position: absolute; | ||
43 | + left: 10px; | ||
44 | + z-Index: 1; } | ||
45 | + | ||
46 | +DIV.menuItemText { | ||
47 | + position: absolute; | ||
48 | + top: 4px; | ||
49 | + left: 8px; | ||
50 | + width: 180px; | ||
51 | + font-size: 12pt; | ||
52 | + z-Index: 2; } | ||
53 | + | ||
54 | +A.menuItemText { | ||
55 | + text-decoration: none; | ||
56 | + color: #000000; } | ||
57 | + | ||
58 | +DIV.content { | ||
59 | + position: absolute; | ||
60 | + top: 80px; | ||
61 | + left: 200px; | ||
62 | + z-Index: 1; } | ||
63 | + | ||
64 | +DIV.contentText { | ||
65 | + position: absolute; | ||
66 | + top: 40px; | ||
67 | + left: 50px; | ||
68 | + z-Index: 2;} | ||
69 | + | ||
70 | +DIV.gnuru { | ||
71 | + position: fixed; | ||
72 | + bottom: 2px; | ||
73 | + right: 2px; | ||
74 | + z-Index: 3; } | ||
75 | + | ||
76 | +DIV.gnuruBubble { | ||
77 | + position: absolute; | ||
78 | + top: -50px; | ||
79 | + left: -50px; | ||
80 | + visibility: hidden; | ||
81 | + z-index: 4; } | ||
82 | + | ||
83 | +A.gnuruBubble { | ||
84 | + text-decoration: none; | ||
85 | + color: #000000; } | ||
86 | + | ||
87 | +DIV.gnuruSais { | ||
88 | + position: absolute; | ||
89 | + top: -412px; | ||
90 | + left: -227px; | ||
91 | + background-color: #FFFFFF; | ||
92 | + border-width: 1px; | ||
93 | + border-style: solid; | ||
94 | + visibility: hidden; | ||
95 | + z-Index: 4; } | ||
96 | + | ||
97 | +P.gnuruWisTitle { | ||
98 | + font-size: 15pt; | ||
99 | + font-weight: normal; | ||
100 | + margin-top: 0px; } | ||
101 | + | ||
102 | +DIV.buttons { | ||
103 | + position: fixed; | ||
104 | + bottom: 0px; | ||
105 | + left: 10px; | ||
106 | + background-color: #FFFFFF; | ||
107 | + padding: 2px; } | ||
108 | + | ||
109 | +A.buttons { | ||
110 | + text-decoration: none; | ||
111 | + color: #000000; } |
db/guestbook.db
0 → 100644
No preview for this file type
images/content-bg.png
0 → 100644
14.8 KB
images/dbd_lg_btn.gif
0 → 100644
3.54 KB
images/elim_lg_btn.gif
0 → 100644
3.25 KB
images/gnuru-bubble.png
0 → 100644
2.66 KB
images/gnuru-sais.png
0 → 100644
178 KB
images/gnuru-trans.png
0 → 100644
32.6 KB
images/gnuru.png
0 → 100644
34.4 KB
images/headline.png
0 → 100644
10.2 KB
images/menu-bg-hilite.png
0 → 100644
819 Bytes
images/menu-bg-select.png
0 → 100644
719 Bytes
images/menu-bg.png
0 → 100644
641 Bytes
images/page-bg.png
0 → 100644
104 KB
index.php
0 → 100644
1 | +<?php | ||
2 | + // define our application directory | ||
3 | + define ('OEDL_DIR', '/var/www/localhost/htdocs/newhome/'); | ||
4 | + // define smarty lib directory | ||
5 | + define ('SAVANT_DIR', '/usr/share/php/Savant2/'); | ||
6 | + | ||
7 | + // initialize gettext | ||
8 | + require_once (OEDL_DIR . 'libs/init_gettext.php'); | ||
9 | + // get oedl_controller | ||
10 | + require_once (OEDL_DIR . 'libs/oedl_ctrl.php'); | ||
11 | + | ||
12 | + $oedl =& new OEDLController; | ||
13 | + | ||
14 | + $oedl->doRequest ($_REQUEST); | ||
15 | +?> |
js/buttons.js
0 → 100644
js/common.js
0 → 100644
1 | +/* | ||
2 | + * This should become a kind of abstraction for browser specific | ||
3 | + * stuff. | ||
4 | + */ | ||
5 | +function browserGlobals () | ||
6 | +{ | ||
7 | + if(navigator.appName=='Netscape' && | ||
8 | + navigator.appVersion.charAt(0)=='4') | ||
9 | + { | ||
10 | + this.browser = 'NS'; | ||
11 | + this.innerWidth = function () { return window.innerWidth; } | ||
12 | + this.innerHeight = function () { return window.innerHeight; } | ||
13 | + } | ||
14 | + else | ||
15 | + if(navigator.appName=='Microsoft Internet Explorer' && | ||
16 | + navigator.appVersion.charAt(0)>='4') | ||
17 | + { | ||
18 | + this.browser = 'IE'; | ||
19 | + this.innerWidth = function () { return document.body.offsetWidth; } | ||
20 | + this.innerHeight = function () { return document.body.offsetHeight; } | ||
21 | + } | ||
22 | + else | ||
23 | + { | ||
24 | + this.browser = 'DOM'; | ||
25 | + this.innerWidth = function () { return window.innerWidth; } | ||
26 | + this.innerHeight = function () { return window.innerHeight; } | ||
27 | + } | ||
28 | +} | ||
29 | + | ||
30 | +var bGlobals = new browserGlobals (); | ||
31 | + | ||
32 | +function objectPos (id, posX, posY) | ||
33 | +{ | ||
34 | + var ob = document.getElementById (id); | ||
35 | + var offsetX = (posX < 0) ? bGlobals.innerWidth () : 0; | ||
36 | + var offsetY = (posY < 0) ? bGlobals.innerHeight () : 0; | ||
37 | + | ||
38 | + if (posX != 0) | ||
39 | + ob.style.left = offsetX + posX; | ||
40 | + | ||
41 | + if (posY != 0) | ||
42 | + ob.style.top = offsetY + posY; | ||
43 | +} |
js/content.js
0 → 100644
js/dialog.js
0 → 100644
1 | +function divShow (id, num) | ||
2 | +{ | ||
3 | + if(bGlobals.browser=='IE') | ||
4 | + layers[num].style.visibility='visible'; | ||
5 | + else if(bGlobals.browser=='NS') | ||
6 | + window.document.layers[num].visibility='visible'; | ||
7 | + else | ||
8 | + document.getElementById(id).style.visibility='visible'; | ||
9 | +} | ||
10 | + | ||
11 | +function divHide (id, num) | ||
12 | +{ | ||
13 | + if(bGlobals.browser=='IE') | ||
14 | + layers[num].style.visibility='hidden'; | ||
15 | + else if(bGlobals.browser=='NS') | ||
16 | + window.document.layers[num].visibility='hidden'; | ||
17 | + else | ||
18 | + document.getElementById(id).style.visibility='hidden'; | ||
19 | +} | ||
20 | + | ||
21 | +function divSetWidth (id, _size) | ||
22 | +{ | ||
23 | + var size = (_size > 0) ? _size : bGlobals.innerWidth () + _size; | ||
24 | + var div = document.getElementById (id); | ||
25 | + div.style.width = size + 'px'; | ||
26 | +} | ||
27 | + | ||
28 | +function divSetHeight (id, _size) | ||
29 | +{ | ||
30 | + var size = (_size > 0) ? _size : bGlobals.innerHeight () + _size; | ||
31 | + var div = document.getElementById (id); | ||
32 | + div.style.height = size + 'px'; | ||
33 | +} | ||
34 | + |
js/gnuru.js
0 → 100644
1 | +gnuru = new Image (); | ||
2 | +gnuru_t = new Image (); | ||
3 | + | ||
4 | +gnuru.src = "images/gnuru.png" | ||
5 | +gnuru_t.src = "images/gnuru-trans.png" | ||
6 | + | ||
7 | +/* Klasse die Weisheiten aufnehmen kann. */ | ||
8 | +function GnuruWisdom (ti, te, so) | ||
9 | +{ | ||
10 | + var title = ti; | ||
11 | + var text = te; | ||
12 | + var source = so; | ||
13 | + | ||
14 | + this.setTitle = function (ti) | ||
15 | + { | ||
16 | + title = ti; | ||
17 | + } | ||
18 | + | ||
19 | + this.setText = function (te) | ||
20 | + { | ||
21 | + text = te; | ||
22 | + } | ||
23 | + | ||
24 | + this.setSource = function (so) | ||
25 | + { | ||
26 | + source = so; | ||
27 | + } | ||
28 | + | ||
29 | + this.getTitle = function () | ||
30 | + { | ||
31 | + return title; | ||
32 | + } | ||
33 | + | ||
34 | + this.getText = function () | ||
35 | + { | ||
36 | + return text; | ||
37 | + } | ||
38 | + | ||
39 | + this.getSource = function () | ||
40 | + { | ||
41 | + return source; | ||
42 | + } | ||
43 | +} | ||
44 | + | ||
45 | +/* an array with all weisheiten (will be filled through php in gnuru.tpl) */ | ||
46 | +var gnuruWisArray = new Array () | ||
47 | + | ||
48 | +/* Eventhandler */ | ||
49 | +function gnuruWake () | ||
50 | +{ | ||
51 | + document.getElementById ('GNURU_IMG').src = gnuru.src; | ||
52 | +} | ||
53 | + | ||
54 | +function gnuruMeditate () | ||
55 | +{ | ||
56 | + document.getElementById ('GNURU_IMG').src = gnuru_t.src; | ||
57 | +} | ||
58 | + | ||
59 | +function gnuruAsk () | ||
60 | +{ | ||
61 | + divShow ('GNURU_BUBBLE', 2); | ||
62 | +} | ||
63 | + | ||
64 | +function gnuruAskEnd () | ||
65 | +{ | ||
66 | + divHide ('GNURU_BUBBLE', 2); | ||
67 | +} | ||
68 | + | ||
69 | +var wisIndex; | ||
70 | +var lastWisIndex; | ||
71 | + | ||
72 | +function gnuruSais () | ||
73 | +{ | ||
74 | + gnuruAskEnd (); | ||
75 | + | ||
76 | + /* create the index for the wisdom that should be displayed, but ensure | ||
77 | + not to create the same index twice */ | ||
78 | + while (wisIndex == lastWisIndex) | ||
79 | + wisIndex = Math.round (Math.random () * 100) % gnuruWisArray.length; | ||
80 | + lastWisIndex = wisIndex; | ||
81 | + | ||
82 | + /* The following clears all childdata from title, text and source ...*/ | ||
83 | + /* ... and then refills it with our own data */ | ||
84 | + node = document.getElementById('GNURU_WIS_TITLE'); | ||
85 | + pnode = node.parentNode; | ||
86 | + pnode.replaceChild (gnuruWisArray[wisIndex].getTitle (), node); | ||
87 | + | ||
88 | + node = document.getElementById('GNURU_WIS_TEXT') | ||
89 | + pnode = node.parentNode; | ||
90 | + pnode.replaceChild (gnuruWisArray[wisIndex].getText (), node); | ||
91 | + | ||
92 | + node = document.getElementById('GNURU_WIS_SOURCE') | ||
93 | + pnode = node.parentNode; | ||
94 | + pnode.replaceChild (gnuruWisArray[wisIndex].getSource (), node); | ||
95 | + | ||
96 | + /* and finally display the whole stuff */ | ||
97 | + divShow ('GNURU_SAIS', 3); | ||
98 | +} | ||
99 | + | ||
100 | +function gnuruSilence () | ||
101 | +{ | ||
102 | + divHide ('GNURU_SAIS', 3); | ||
103 | +} | ||
104 | + |
js/menu.js
0 → 100644
1 | +var menuBgN = new Image (); | ||
2 | +var menuBgS = new Image (); | ||
3 | + | ||
4 | +menuBgN.src = 'images/menu-bg.png'; | ||
5 | +menuBgS.src = 'images/menu-bg-select.png'; | ||
6 | + | ||
7 | +function menuOn (id) | ||
8 | +{ | ||
9 | + var entry = document.getElementById (id); | ||
10 | + | ||
11 | + if (entry.src == menuBgN.src) | ||
12 | + entry.src = menuBgS.src; | ||
13 | +} | ||
14 | + | ||
15 | +function menuOff (id) | ||
16 | +{ | ||
17 | + var entry = document.getElementById (id); | ||
18 | + | ||
19 | + if (entry.src == menuBgS.src) | ||
20 | + entry.src = menuBgN.src; | ||
21 | +} |
libs/gnuru.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | + class gnuru | ||
4 | + { | ||
5 | + private $wisdom; | ||
6 | + | ||
7 | + function gnuru () | ||
8 | + { | ||
9 | + $this->wisdom = array ( | ||
10 | + array ('title' => _('We are all the same!'), | ||
11 | + 'text' => explode ('\n', _('Please remember people,\nNo matter who you are\nAnd what you do to live, thrive and survive,\nThere are still some thing that make us all the same!\nYou, me, them, everybody everybody!')), | ||
12 | + 'source' => _('Everybody Needs Somebody to Love, Disk 1 Track 2, Blues Brother Soundtrack')), | ||
13 | + array ('title' => _('Live Now!'), | ||
14 | + 'text' => explode ('\n', _('Past is just an illusion composed of our memories and future is just another illusion composed of our wishes and desires.\nPresent is endless in it\'s possibilities.\nSo don\'t cry about missed chances in the past and don\'t dream fruitless dreams of a better future.\nLive and act now to become content and lucky.')), | ||
15 | + 'source' => _('The Gnuru himself')), | ||
16 | + array ('title' => _('Watch Your Feet!'), | ||
17 | + 'text' => explode ('\n', _('It\'s a dangerous business, going out of the door.\nYou step into the road, and if you don\'t keep your feet\nthere is no knowing where you might be swept off to.')), | ||
18 | + 'source' => _('Bilbo Baggins, The Lord of the Rings, Chapter 3'))); | ||
19 | + } | ||
20 | + | ||
21 | + function getWisdom () | ||
22 | + { | ||
23 | + return $this->wisdom; | ||
24 | + } | ||
25 | + } | ||
26 | + | ||
27 | +?> |
libs/guestbook.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +/** | ||
4 | + * Project: Guestbook of OEDL Homepage. This is derived from the Smarty | ||
5 | + * Guestbook example. The original comment to this code can be found | ||
6 | + * below. | ||
7 | + * Changes: First of all this guestbook uses gettext to achive i18n | ||
8 | + * On mozilla i try to figure out the language to use by the | ||
9 | + * information provided by the browser. It seems that this works | ||
10 | + * also for IE, sadly konqueror behaves different. Well, on | ||
11 | + * IE and konquerer it is not possible to view the HP correctly | ||
12 | + * 'cause of different reasons, at the moment. | ||
13 | + * The next big change is, that i moved the page from Smarty to | ||
14 | + * Savant2 this was done with absolutely no pain at all. | ||
15 | + * There might ba additions to the functionality of this class | ||
16 | + * in future. | ||
17 | + * Author: Georg Steffers <georg [AT] steffers [DOT] org> | ||
18 | + * Date: Oct 26th, 2006 | ||
19 | + * File: guestbook.php | ||
20 | + * Version: 0.1 | ||
21 | + */ | ||
22 | + | ||
23 | +/** | ||
24 | + * Original comment | ||
25 | + * Project: Guestbook Sample Smarty Application | ||
26 | + * Author: Monte Ohrt <monte [AT] ohrt [DOT] com> | ||
27 | + * Date: March 14th, 2005 | ||
28 | + * File: guestbook.lib.tpl | ||
29 | + * Version: 1.0 | ||
30 | + */ | ||
31 | + | ||
32 | +require_once (OEDL_DIR . 'libs/guestbook_db.php'); | ||
33 | + | ||
34 | +/** | ||
35 | + * guestbook application library | ||
36 | + * | ||
37 | + */ | ||
38 | +class Guestbook | ||
39 | +{ | ||
40 | + // database object | ||
41 | + var $gdDb = null; | ||
42 | + // error number | ||
43 | + var $error = 0; | ||
44 | + // error messages | ||
45 | + var $err_msg = array (); | ||
46 | + | ||
47 | + /** | ||
48 | + * class constructor | ||
49 | + */ | ||
50 | + function __construct () | ||
51 | + { | ||
52 | + // instantiate the sql object | ||
53 | + $this->gbDb =& new GuestbookDb (OEDL_DIR . 'db/guestbook.db'); | ||
54 | + $this->gbDb->open (); | ||
55 | + | ||
56 | + // initialize error messages | ||
57 | + array_push | ||
58 | + ( | ||
59 | + $this->err_msg, | ||
60 | + _("No error"), | ||
61 | + _("You must supply a name"), | ||
62 | + _("You must supply a comment") | ||
63 | + ); | ||
64 | + } | ||
65 | + | ||
66 | + function __destruct () | ||
67 | + { | ||
68 | + if ($this->gbDb) | ||
69 | + $this->gbDb->close (); | ||
70 | + } | ||
71 | + | ||
72 | + /** | ||
73 | + * display the guestbook entry form | ||
74 | + * | ||
75 | + * @param array $formvars the form variables | ||
76 | + */ | ||
77 | + function getFormData ($formvars = array ('Name' => '', 'Comment' => '')) | ||
78 | + { | ||
79 | + return array ( | ||
80 | + 'post' => $formvars, | ||
81 | + 'error' => $this->error, | ||
82 | + 'err_msg' => $this->err_msg[$this->error], | ||
83 | + 'contentTpl' => 'guestbook_form.tpl.php' | ||
84 | + ); | ||
85 | + } | ||
86 | + | ||
87 | + /** | ||
88 | + * fix up form data if necessary | ||
89 | + * | ||
90 | + * @param array $formvars the form variables | ||
91 | + */ | ||
92 | + function mungeFormData (&$formvars) | ||
93 | + { | ||
94 | + // trim off excess whitespace | ||
95 | + $formvars['Name'] = trim ($formvars['Name']); | ||
96 | + $formvars['Comment'] = trim ($formvars['Comment']); | ||
97 | + } | ||
98 | + | ||
99 | + /** | ||
100 | + * test if form information is valid | ||
101 | + * | ||
102 | + * @param array $formvars the form variables | ||
103 | + */ | ||
104 | + function isValidForm ($formvars) | ||
105 | + { | ||
106 | + // reset error message | ||
107 | + $this->error = null; | ||
108 | + | ||
109 | + // test if "Name" is empty | ||
110 | + if (strlen ($formvars['Name']) == 0) | ||
111 | + { | ||
112 | + $this->error = 1; | ||
113 | + return false; | ||
114 | + } | ||
115 | + | ||
116 | + // test if "Comment" is empty | ||
117 | + if (strlen ($formvars['Comment']) == 0) | ||
118 | + { | ||
119 | + $this->error = 2; | ||
120 | + return false; | ||
121 | + } | ||
122 | + | ||
123 | + // form passed validation | ||
124 | + return true; | ||
125 | + } | ||
126 | + | ||
127 | + /** | ||
128 | + * add a new guestbook entry | ||
129 | + * | ||
130 | + * @param array $formvars the form variables | ||
131 | + */ | ||
132 | + function addEntry ($formvars) | ||
133 | + { | ||
134 | + return $this->gbDb->addEntry ($formvars['Name'], $formvars['Comment']); | ||
135 | + } | ||
136 | + | ||
137 | + /** | ||
138 | + * get the guestbook entries | ||
139 | + */ | ||
140 | + function getEntries () | ||
141 | + { | ||
142 | + return $this->gbDb->getEntries (); | ||
143 | + } | ||
144 | +} | ||
145 | + | ||
146 | +?> |
libs/guestbook_db.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | + require_once (OEDL_DIR . 'libs/guestbookdbexception.php'); | ||
4 | + | ||
5 | + define ('GUESTBOOK_DELIM', '>#/\#<'); | ||
6 | + | ||
7 | + class GuestbookDb | ||
8 | + { | ||
9 | + var $dsn = NULL; // dsn => data source name | ||
10 | + var $db = NULL; // handle to db | ||
11 | + | ||
12 | + public function __construct ($dsn) | ||
13 | + { | ||
14 | + $this->dsn = $dsn; | ||
15 | + } | ||
16 | + | ||
17 | + public function open () | ||
18 | + { | ||
19 | + $this->db = dba_open ($this->dsn, 'c', 'db4', 0600); | ||
20 | + if ($this->db == FALSE) | ||
21 | + throw (new GuestbookDbException (DB_OPEN_EXC)); | ||
22 | + } | ||
23 | + | ||
24 | + public function close () | ||
25 | + { | ||
26 | + dba_close ($this->db); | ||
27 | + } | ||
28 | + | ||
29 | + public function getEntries () | ||
30 | + { | ||
31 | + $data = array (); | ||
32 | + | ||
33 | + $key = dba_firstkey ($this->db); | ||
34 | + | ||
35 | + while ($key) | ||
36 | + { | ||
37 | + $value = dba_fetch ($key, $this->db); | ||
38 | + | ||
39 | + if ($value == FALSE) | ||
40 | + throw (new GuestbookDbException (DB_GETVAL_EXC)); | ||
41 | + | ||
42 | + $_row = explode (GUESTBOOK_DELIM, $value); | ||
43 | + $row['Name'] = $_row[0]; | ||
44 | + $row['Comment'] = $_row[1]; | ||
45 | + $row['EntryDate']= $_row[2]; | ||
46 | + | ||
47 | + $data[] = $row; | ||
48 | + | ||
49 | + $key = dba_nextkey ($this->db); | ||
50 | + } | ||
51 | + | ||
52 | + rsort ($data); | ||
53 | + return $data; | ||
54 | + } | ||
55 | + | ||
56 | + public function addEntry ($name, $comment) | ||
57 | + { | ||
58 | + $time = time (); | ||
59 | + $idx = 0; | ||
60 | + $key = implode (':', array ($time, $idx)); | ||
61 | + $value = implode (GUESTBOOK_DELIM, array ($name, $comment, $time)); | ||
62 | + | ||
63 | + while (dba_insert ($key, $value, $this->db) == FALSE) | ||
64 | + { | ||
65 | + $idx = $idx + 1; | ||
66 | + | ||
67 | + if ($idx > 9) | ||
68 | + throw (new GuestbookDbException (DB_INSERT_EXC)); | ||
69 | + | ||
70 | + $key = implode (':', array ($time, $idx)); | ||
71 | + } | ||
72 | + } | ||
73 | + } | ||
74 | + | ||
75 | +?> |
libs/guestbookdbexception.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +require_once (OEDL_DIR . 'libs/myexception.php'); | ||
4 | + | ||
5 | +define ('DB_OPEN_EXC', 0); | ||
6 | +define ('DB_GETVAL_EXC', 1); | ||
7 | +define ('DB_INSERT_EXC', 2); | ||
8 | + | ||
9 | +class GuestbookDbException extends MyException | ||
10 | +{ | ||
11 | + protected $msg = array ( | ||
12 | + 'Failed to open db', | ||
13 | + 'Error getting value for key.', | ||
14 | + 'Could not create valid key for data. Tried 10 times' | ||
15 | + ); | ||
16 | +} | ||
17 | + | ||
18 | +?> |
libs/init_gettext.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | + /* | ||
4 | + * First find the browser encoding and try to create a valid locale | ||
5 | + * from one of the supported browser encodings. Start with the most | ||
6 | + * preferred encoding. | ||
7 | + * If no country code is found use the same as for language. | ||
8 | + * !!! FIXME: Is this code correct for IE too??? !!! | ||
9 | + */ | ||
10 | + $langs = explode (",", $_SERVER[HTTP_ACCEPT_LANGUAGE]); | ||
11 | + foreach ($langs as $lang) | ||
12 | + { | ||
13 | + preg_match("/^([a-z]{2})-*([a-z|A-Z]{2})*(;q=* *)*([0-9].[0-9])*$/", | ||
14 | + $lang, $lng_pref); | ||
15 | + | ||
16 | + $la = $lng_pref[1]; | ||
17 | + $co = strtoupper ($lng_pref[2]); | ||
18 | + $pr = ($lng_pref[4] == "") ? 1.0 : $lng_pref[4]; | ||
19 | + | ||
20 | + if ($co == "") | ||
21 | + { | ||
22 | + switch(true) { | ||
23 | + case $la === "en": | ||
24 | + $co = "GB"; | ||
25 | + break; | ||
26 | + case $la === "ja": | ||
27 | + $co = "JP"; | ||
28 | + break; | ||
29 | + default: | ||
30 | + /* if not set most of the time i assume co = strtoupper (la) */ | ||
31 | + $co = strtoupper ($la); | ||
32 | + } | ||
33 | + } | ||
34 | + | ||
35 | + if ($co != "US") | ||
36 | + $la_specs[$la."_".$co]=$pr; | ||
37 | + else | ||
38 | + $la_specs["POSIX"]=$pr; | ||
39 | + } | ||
40 | + array_multisort ($la_specs, SORT_DESC, SORT_NUMERIC); | ||
41 | + | ||
42 | + /* | ||
43 | + * Set locale and initialize gettext catalogs | ||
44 | + */ | ||
45 | + foreach ($la_specs as $key => $value) | ||
46 | + if ("" != ($locale=setlocale (LC_MESSAGES, $key))) break; | ||
47 | + | ||
48 | + setlocale (LC_TIME, $locale); | ||
49 | + bindtextdomain ("messages", OEDL_DIR . 'locale'); | ||
50 | + bind_textdomain_codeset ("messages", "UTF-8"); | ||
51 | + textdomain ("messages"); | ||
52 | + | ||
53 | +?> |
libs/menu.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | + class menu | ||
4 | + { | ||
5 | + private $entries; | ||
6 | + | ||
7 | + function menu () | ||
8 | + { | ||
9 | + $this->entries = array ( | ||
10 | + 'about' => array (_('About'), 'content.tpl.php'), | ||
11 | + 'news' => array (_('News'), 'content.tpl.php'), | ||
12 | + 'personal' => array (_('Personel'), 'content.tpl.php'), | ||
13 | + 'sources' => array (_('Sources'), 'source.tpl.php'), | ||
14 | + 'phil' => array (_('Philosophical'), 'content.tpl.php'), | ||
15 | + 'bookrev' => array (_('Bookreview'), 'content.tpl.php'), | ||
16 | + 'movierev' => array (_('Moviereview'), 'content.tpl.php'), | ||
17 | + 'anime' => array (_('Anime-series/movies'), 'content.tpl.php'), | ||
18 | + 'gnu' => array (_('GNU/Linux'), 'content.tpl.php'), | ||
19 | + 'guestbook' => array (_('Guestbook'), 'guestbook.tpl.php'), | ||
20 | + 'links' => array (_('Links'), 'content.tpl.php') | ||
21 | + ); | ||
22 | + } | ||
23 | + | ||
24 | + function menuGet () | ||
25 | + { | ||
26 | + return $this->entries; | ||
27 | + } | ||
28 | + | ||
29 | + function menuGetIds () | ||
30 | + { | ||
31 | + return array_keys ($this->entries); | ||
32 | + } | ||
33 | + | ||
34 | + function menuGetTextById ($id) | ||
35 | + { | ||
36 | + return $this->entries[$id][0]; | ||
37 | + } | ||
38 | + | ||
39 | + function menuGetTplById ($id) | ||
40 | + { | ||
41 | + return $this->entries[$id][1]; | ||
42 | + } | ||
43 | + } | ||
44 | + | ||
45 | +?> |
libs/myexception.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +abstract class MyException extends Exception | ||
4 | +{ | ||
5 | + protected $msg = array (); | ||
6 | + | ||
7 | + public function __construct ($code) | ||
8 | + { | ||
9 | + parent::__construct ($this->msg [$code], $code); | ||
10 | + } | ||
11 | + | ||
12 | + public function __toString () | ||
13 | + { | ||
14 | + return __CLASS__ . "[{$this->code}] at " . $this->getFile () . | ||
15 | + "(" . $this->getLine . "): {$this->message}\n"; | ||
16 | + } | ||
17 | +} | ||
18 | + | ||
19 | +?> |
libs/oedl_ctrl.php
0 → 100644
1 | +<?php | ||
2 | + // Guestbook Kram | ||
3 | + require_once (OEDL_DIR . 'libs/guestbook.php'); | ||
4 | + // get all stuff about menus | ||
5 | + require_once (OEDL_DIR . 'libs/menu.php'); | ||
6 | + // get GNURU_WISDOM constant | ||
7 | + require_once (OEDL_DIR . 'libs/gnuru.php'); | ||
8 | + // get Savant2 baseclass | ||
9 | + require_once ('/usr/share/php/Savant2.php'); | ||
10 | + | ||
11 | + // now create out controller | ||
12 | + class OEDLController extends Savant2 | ||
13 | + { | ||
14 | + /*** private member ***/ | ||
15 | + private $menu; /* a reference to a menu object */ | ||
16 | + private $gnuru; /* a reference to a gnuru object */ | ||
17 | + private $gb; /* mein Gästebuch */ | ||
18 | + | ||
19 | + | ||
20 | + /*** public methods ***/ | ||
21 | + | ||
22 | + /* | ||
23 | + * Constructor | ||
24 | + */ | ||
25 | + function __construct () | ||
26 | + { | ||
27 | + $this->addPath ('template', OEDL_DIR . 'templates'); | ||
28 | + $this->addPath ('resource', SAVANT_DIR); | ||
29 | + $this->addPath ('resource', OEDL_DIR . 'resources'); | ||
30 | + | ||
31 | + error_reporting (E_ALL); | ||
32 | + | ||
33 | + try | ||
34 | + { | ||
35 | + $this->menu =& new menu; | ||
36 | + $this->gnuru =& new gnuru; | ||
37 | + $this->gb =& new Guestbook; | ||
38 | + } | ||
39 | + catch (MyException $e) | ||
40 | + { | ||
41 | + $this->display ('init_err.tpl.php'); | ||
42 | + exit (1); | ||
43 | + } | ||
44 | + | ||
45 | + $this->assign ('gnuruWisdom', $this->gnuru->getWisdom ()); | ||
46 | + } | ||
47 | + | ||
48 | + /* | ||
49 | + * doRequest: processes a request. The only public function beneath the | ||
50 | + * constructor (well, at the moment) | ||
51 | + * | ||
52 | + * @param: request array containing the request (normally $_REQUEST) | ||
53 | + */ | ||
54 | + function doRequest ($request) | ||
55 | + { | ||
56 | + $content = isset($request['cont']) ? $request['cont'] : 'about'; | ||
57 | + | ||
58 | + $this->assign ('menuItems', $this->menu->menuGet ()); | ||
59 | + $this->assign ('contentId', $content); | ||
60 | + $this->assign ('contentHead', $this->menu->menuGetTextById ($content)); | ||
61 | + $this->assign ('contentTpl', $this->menu->menuGetTplById ($content)); | ||
62 | + | ||
63 | + $action = isset($request['action']) ? $request['action'] : 'view'; | ||
64 | + | ||
65 | + switch ($content) | ||
66 | + { | ||
67 | + case 'guestbook': | ||
68 | + switch ($action) | ||
69 | + { | ||
70 | + /* all actions that could accure will be handles here */ | ||
71 | + | ||
72 | + case 'add': | ||
73 | + // adding a guestbook entry | ||
74 | + $this->assign ($this->gb->getFormData ()); | ||
75 | + break; | ||
76 | + case 'submit': | ||
77 | + // submitting a guestbook entry | ||
78 | + $this->gb->mungeFormData($_POST); | ||
79 | + if($this->gb->isValidForm($_POST)) | ||
80 | + { | ||
81 | + try | ||
82 | + { | ||
83 | + $this->gb->addEntry($_POST); | ||
84 | + $this->assign ('data', $this->gb->getEntries()); | ||
85 | + } | ||
86 | + catch (MyException $e) | ||
87 | + { | ||
88 | + $this->assign ('contentId', $content); | ||
89 | + $this->assign ('contentHead', _('Error')); | ||
90 | + $this->assign ('contentTpl', 'error.tpl.php'); | ||
91 | + } | ||
92 | + } | ||
93 | + else | ||
94 | + { | ||
95 | + $this->assign ($this->gb->getFormData($_POST)); | ||
96 | + } | ||
97 | + break; | ||
98 | + case 'view': | ||
99 | + default: | ||
100 | + try { | ||
101 | + $this->assign ('data', $this->gb->getEntries()); | ||
102 | + } | ||
103 | + catch (MyException $e) | ||
104 | + { | ||
105 | + $this->assign ('contentId', $content); | ||
106 | + $this->assign ('contentHead', _('Error')); | ||
107 | + $this->assign ('contentTpl', 'error.tpl.php'); | ||
108 | + } | ||
109 | + break; | ||
110 | + } | ||
111 | + } | ||
112 | + | ||
113 | + $this->display ('frame.tpl.php'); | ||
114 | + } | ||
115 | + } | ||
116 | +?> |
locale/de/LC_MESSAGES/messages.mo
0 → 100644
No preview for this file type
po/de.po
0 → 100644
1 | +# Translation for The Spirit of Freedom homepage | ||
2 | +# Copyright (C) 2006 | ||
3 | +# This file is distributed under the same license as the The_Spirit_of_Freedom_HP package. | ||
4 | +# Georg Steffers <georg@steffers.org>, 2006. | ||
5 | +# | ||
6 | +msgid "" | ||
7 | +msgstr "" | ||
8 | +"Project-Id-Version: 0.0\n" | ||
9 | +"Report-Msgid-Bugs-To: \n" | ||
10 | +"POT-Creation-Date: 2006-10-30 09:35+0100\n" | ||
11 | +"PO-Revision-Date: 2006-09-26 12:00+0200\n" | ||
12 | +"Last-Translator: <georg@steffers.org>\n" | ||
13 | +"Language-Team: German <translation-team-de@lists.sourceforge.net>\n" | ||
14 | +"MIME-Version: 1.0\n" | ||
15 | +"Content-Type: text/plain; charset=UTF-8\n" | ||
16 | +"Content-Transfer-Encoding: 8bit\n" | ||
17 | +"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
18 | + | ||
19 | +#: ../libs/gnuru.php:10 | ||
20 | +msgid "We are all the same!" | ||
21 | +msgstr "Wir sind alle gleich!" | ||
22 | + | ||
23 | +#: ../libs/gnuru.php:11 | ||
24 | +msgid "" | ||
25 | +"Please remember people,\\nNo matter who you are\\nAnd what you do to live, " | ||
26 | +"thrive and survive,\\nThere are still some thing that make us all the same!" | ||
27 | +"\\nYou, me, them, everybody everybody!" | ||
28 | +msgstr "" | ||
29 | +"Erinnert euch bitte,\\nEgal wer wir sind\\nUnd wie wir leben, wachsen und " | ||
30 | +"überleben,\\nEs gibt immer noch Einiges in dem wir uns gleichen!\\nDu, ich, " | ||
31 | +"sie, jeder jeder!" | ||
32 | + | ||
33 | +#: ../libs/gnuru.php:12 | ||
34 | +msgid "" | ||
35 | +"Everybody Needs Somebody to Love, Disk 1 Track 2, Blues Brother Soundtrack" | ||
36 | +msgstr "" | ||
37 | + | ||
38 | +#: ../libs/gnuru.php:13 | ||
39 | +msgid "Live Now!" | ||
40 | +msgstr "Lebe jetzt!" | ||
41 | + | ||
42 | +#: ../libs/gnuru.php:14 | ||
43 | +msgid "" | ||
44 | +"Past is just an illusion composed of our memories and future is just another " | ||
45 | +"illusion composed of our wishes and desires.\\nPresent is endless in it's " | ||
46 | +"possibilities.\\nSo don't cry about missed chances in the past and don't " | ||
47 | +"dream fruitless dreams of a better future.\\nLive and act now to become " | ||
48 | +"content and lucky." | ||
49 | +msgstr "" | ||
50 | +"Vergangenheit ist eine Illusion geschaffen aus unseren Erinnerungen und " | ||
51 | +"Zukunft ist nur eine weitere Illusion geschaffen aus unseren Wünschen und " | ||
52 | +"Begierden.\\nDie Gegenwart ist unendlich in ihren Möglichkeiten.\\nAlso " | ||
53 | +"weine nicht über verpaßte Chances in der Vergangenheit und Träume keine " | ||
54 | +"fruchtlosen Träume von einer besseren Zukunft.\\nLebe und handle jetzt um " | ||
55 | +"erfüllt und glücklich zu werden." | ||
56 | + | ||
57 | +#: ../libs/gnuru.php:15 | ||
58 | +msgid "The Gnuru himself" | ||
59 | +msgstr "Der Gnuru höchstselbst" | ||
60 | + | ||
61 | +#: ../libs/gnuru.php:16 | ||
62 | +msgid "Watch Your Feet!" | ||
63 | +msgstr "Achte auf deine Schritte!" | ||
64 | + | ||
65 | +#: ../libs/gnuru.php:17 | ||
66 | +msgid "" | ||
67 | +"It's a dangerous business, going out of the door.\\nYou step into the road, " | ||
68 | +"and if you don't keep your feet\\nthere is no knowing where you might be " | ||
69 | +"swept off to." | ||
70 | +msgstr "" | ||
71 | +"Es ist eine gefährliche Sache, aus deiner Tür hinauszugehen.\\nDu betrittst " | ||
72 | +"die Straße, und wenn du nicht auf deine Füße aufpaßt\\nkann man nicht " | ||
73 | +"wissen, wohin sie dich tragen." | ||
74 | + | ||
75 | +#: ../libs/gnuru.php:18 | ||
76 | +msgid "Bilbo Baggins, The Lord of the Rings, Chapter 3" | ||
77 | +msgstr "Bilbo Beutlin, Der Herr der Ringe, Kapitel 3" | ||
78 | + | ||
79 | +#: ../libs/guestbook.php:50 ../libs/guestbook.php:60 | ||
80 | +msgid "No error" | ||
81 | +msgstr "Kein Fehler" | ||
82 | + | ||
83 | +#: ../libs/guestbook.php:51 ../libs/guestbook.php:61 | ||
84 | +msgid "You must supply a name" | ||
85 | +msgstr "Sie müssen einen Namen angeben" | ||
86 | + | ||
87 | +#: ../libs/guestbook.php:52 ../libs/guestbook.php:62 | ||
88 | +msgid "You must supply a comment" | ||
89 | +msgstr "Sie müssen einen Kommentar eintragen" | ||
90 | + | ||
91 | +#: ../libs/menu.php:10 | ||
92 | +msgid "About" | ||
93 | +msgstr "Über" | ||
94 | + | ||
95 | +#: ../libs/menu.php:11 | ||
96 | +msgid "News" | ||
97 | +msgstr "Neues" | ||
98 | + | ||
99 | +#: ../libs/menu.php:12 | ||
100 | +msgid "Personel" | ||
101 | +msgstr "Persönliches" | ||
102 | + | ||
103 | +#: ../libs/menu.php:13 | ||
104 | +msgid "Sources" | ||
105 | +msgstr "Quellcodes" | ||
106 | + | ||
107 | +#: ../libs/menu.php:14 | ||
108 | +msgid "Philosophical" | ||
109 | +msgstr "Philosophisches" | ||
110 | + | ||
111 | +#: ../libs/menu.php:15 | ||
112 | +msgid "Bookreview" | ||
113 | +msgstr "Buchrezension" | ||
114 | + | ||
115 | +#: ../libs/menu.php:16 | ||
116 | +msgid "Moviereview" | ||
117 | +msgstr "Filmrezension" | ||
118 | + | ||
119 | +#: ../libs/menu.php:17 | ||
120 | +msgid "Anime-series/movies" | ||
121 | +msgstr "Anime-Serien/Filme" | ||
122 | + | ||
123 | +#: ../libs/menu.php:18 | ||
124 | +msgid "GNU/Linux" | ||
125 | +msgstr "" | ||
126 | + | ||
127 | +#: ../libs/menu.php:19 | ||
128 | +msgid "Guestbook" | ||
129 | +msgstr "Gästebuch" | ||
130 | + | ||
131 | +#: ../libs/menu.php:20 | ||
132 | +msgid "Links" | ||
133 | +msgstr "" | ||
134 | + | ||
135 | +#: ../templates/frame.tpl.php:3 ../templates/frame.tpl.php:21 | ||
136 | +#: ../templates/frame.tpl.php:5 ../templates/frame.tpl.php:22 | ||
137 | +#: ../templates/init_err.tpl.php:3 | ||
138 | +msgid "The Spirit of Freedom" | ||
139 | +msgstr "Der Geist der Freiheit" | ||
140 | + | ||
141 | +#: ../templates/frame.tpl.php:39 ../templates/frame.tpl.php:46 | ||
142 | +msgid "hide" | ||
143 | +msgstr "ausblenden" | ||
144 | + | ||
145 | +#: ../templates/gnuru.tpl.php:17 | ||
146 | +msgid "title" | ||
147 | +msgstr "" | ||
148 | + | ||
149 | +#: ../templates/gnuru.tpl.php:42 ../templates/gnuru.tpl.php:47 | ||
150 | +msgid "You need help my padavan?" | ||
151 | +msgstr "Du brauchst hilfe mein Padavan?" | ||
152 | + | ||
153 | +#: ../templates/gnuru.tpl.php:44 ../templates/gnuru.tpl.php:49 | ||
154 | +msgid "Wisdom" | ||
155 | +msgstr "Weisheit" | ||
156 | + | ||
157 | +#: ../templates/gnuru.tpl.php:47 ../templates/gnuru.tpl.php:52 | ||
158 | +msgid "more practical help" | ||
159 | +msgstr "eher praktische Hilfe" | ||
160 | + | ||
161 | +#: ../templates/guestbook_form.tpl.php:15 | ||
162 | +#: ../templates/guestbook_form.tpl.php:18 ../templates/guestbook.tpl.php:12 | ||
163 | +#: ../templates/guestbook.tpl.php:13 | ||
164 | +msgid "Name" | ||
165 | +msgstr "" | ||
166 | + | ||
167 | +#: ../templates/guestbook_form.tpl.php:22 | ||
168 | +#: ../templates/guestbook_form.tpl.php:24 ../templates/guestbook.tpl.php:20 | ||
169 | +#: ../templates/guestbook.tpl.php:19 | ||
170 | +msgid "Comment" | ||
171 | +msgstr "Kommentar" | ||
172 | + | ||
173 | +#: ../templates/guestbook.tpl.php:5 ../templates/guestbook.tpl.php:6 | ||
174 | +msgid "Guestbook Entries" | ||
175 | +msgstr "Gästebuch-Einträge" | ||
176 | + | ||
177 | +#: ../templates/guestbook.tpl.php:6 ../templates/guestbook.tpl.php:7 | ||
178 | +msgid "add" | ||
179 | +msgstr "hinzufügen" | ||
180 | + | ||
181 | +#: ../templates/guestbook.tpl.php:25 ../templates/guestbook.tpl.php:24 | ||
182 | +msgid "No records" | ||
183 | +msgstr "Keine Einträge" | ||
184 | + | ||
185 | +#: ../libs/oedl_ctrl.php:89 ../libs/oedl_ctrl.php:106 | ||
186 | +msgid "Error" | ||
187 | +msgstr "Fehler" |
po/messages.po
0 → 100644
1 | +# SOME DESCRIPTIVE TITLE. | ||
2 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
3 | +# This file is distributed under the same license as the PACKAGE package. | ||
4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
5 | +# | ||
6 | +#, fuzzy | ||
7 | +msgid "" | ||
8 | +msgstr "" | ||
9 | +"Project-Id-Version: PACKAGE VERSION\n" | ||
10 | +"Report-Msgid-Bugs-To: \n" | ||
11 | +"POT-Creation-Date: 2006-10-30 09:35+0100\n" | ||
12 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
13 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
14 | +"Language-Team: LANGUAGE <LL@li.org>\n" | ||
15 | +"MIME-Version: 1.0\n" | ||
16 | +"Content-Type: text/plain; charset=UTF-8\n" | ||
17 | +"Content-Transfer-Encoding: 8bit\n" | ||
18 | + | ||
19 | +#: ../libs/gnuru.php:10 | ||
20 | +msgid "We are all the same!" | ||
21 | +msgstr "" | ||
22 | + | ||
23 | +#: ../libs/gnuru.php:11 | ||
24 | +msgid "" | ||
25 | +"Please remember people,\\nNo matter who you are\\nAnd what you do to live, " | ||
26 | +"thrive and survive,\\nThere are still some thing that make us all the same!" | ||
27 | +"\\nYou, me, them, everybody everybody!" | ||
28 | +msgstr "" | ||
29 | + | ||
30 | +#: ../libs/gnuru.php:12 | ||
31 | +msgid "" | ||
32 | +"Everybody Needs Somebody to Love, Disk 1 Track 2, Blues Brother Soundtrack" | ||
33 | +msgstr "" | ||
34 | + | ||
35 | +#: ../libs/gnuru.php:13 | ||
36 | +msgid "Live Now!" | ||
37 | +msgstr "" | ||
38 | + | ||
39 | +#: ../libs/gnuru.php:14 | ||
40 | +msgid "" | ||
41 | +"Past is just an illusion composed of our memories and future is just another " | ||
42 | +"illusion composed of our wishes and desires.\\nPresent is endless in it's " | ||
43 | +"possibilities.\\nSo don't cry about missed chances in the past and don't " | ||
44 | +"dream fruitless dreams of a better future.\\nLive and act now to become " | ||
45 | +"content and lucky." | ||
46 | +msgstr "" | ||
47 | + | ||
48 | +#: ../libs/gnuru.php:15 | ||
49 | +msgid "The Gnuru himself" | ||
50 | +msgstr "" | ||
51 | + | ||
52 | +#: ../libs/gnuru.php:16 | ||
53 | +msgid "Watch Your Feet!" | ||
54 | +msgstr "" | ||
55 | + | ||
56 | +#: ../libs/gnuru.php:17 | ||
57 | +msgid "" | ||
58 | +"It's a dangerous business, going out of the door.\\nYou step into the road, " | ||
59 | +"and if you don't keep your feet\\nthere is no knowing where you might be " | ||
60 | +"swept off to." | ||
61 | +msgstr "" | ||
62 | + | ||
63 | +#: ../libs/gnuru.php:18 | ||
64 | +msgid "Bilbo Baggins, The Lord of the Rings, Chapter 3" | ||
65 | +msgstr "" | ||
66 | + | ||
67 | +#: ../libs/guestbook.php:50 ../libs/guestbook.php:60 | ||
68 | +msgid "No error" | ||
69 | +msgstr "" | ||
70 | + | ||
71 | +#: ../libs/guestbook.php:51 ../libs/guestbook.php:61 | ||
72 | +msgid "You must supply a name" | ||
73 | +msgstr "" | ||
74 | + | ||
75 | +#: ../libs/guestbook.php:52 ../libs/guestbook.php:62 | ||
76 | +msgid "You must supply a comment" | ||
77 | +msgstr "" | ||
78 | + | ||
79 | +#: ../libs/menu.php:10 | ||
80 | +msgid "About" | ||
81 | +msgstr "" | ||
82 | + | ||
83 | +#: ../libs/menu.php:11 | ||
84 | +msgid "News" | ||
85 | +msgstr "" | ||
86 | + | ||
87 | +#: ../libs/menu.php:12 | ||
88 | +msgid "Personel" | ||
89 | +msgstr "" | ||
90 | + | ||
91 | +#: ../libs/menu.php:13 | ||
92 | +msgid "Sources" | ||
93 | +msgstr "" | ||
94 | + | ||
95 | +#: ../libs/menu.php:14 | ||
96 | +msgid "Philosophical" | ||
97 | +msgstr "" | ||
98 | + | ||
99 | +#: ../libs/menu.php:15 | ||
100 | +msgid "Bookreview" | ||
101 | +msgstr "" | ||
102 | + | ||
103 | +#: ../libs/menu.php:16 | ||
104 | +msgid "Moviereview" | ||
105 | +msgstr "" | ||
106 | + | ||
107 | +#: ../libs/menu.php:17 | ||
108 | +msgid "Anime-series/movies" | ||
109 | +msgstr "" | ||
110 | + | ||
111 | +#: ../libs/menu.php:18 | ||
112 | +msgid "GNU/Linux" | ||
113 | +msgstr "" | ||
114 | + | ||
115 | +#: ../libs/menu.php:19 | ||
116 | +msgid "Guestbook" | ||
117 | +msgstr "" | ||
118 | + | ||
119 | +#: ../libs/menu.php:20 | ||
120 | +msgid "Links" | ||
121 | +msgstr "" | ||
122 | + | ||
123 | +#: ../templates/frame.tpl.php:3 ../templates/frame.tpl.php:21 | ||
124 | +#: ../templates/frame.tpl.php:5 ../templates/frame.tpl.php:22 | ||
125 | +#: ../templates/init_err.tpl.php:3 | ||
126 | +msgid "The Spirit of Freedom" | ||
127 | +msgstr "" | ||
128 | + | ||
129 | +#: ../templates/frame.tpl.php:39 ../templates/frame.tpl.php:46 | ||
130 | +msgid "hide" | ||
131 | +msgstr "" | ||
132 | + | ||
133 | +#: ../templates/gnuru.tpl.php:17 | ||
134 | +msgid "title" | ||
135 | +msgstr "" | ||
136 | + | ||
137 | +#: ../templates/gnuru.tpl.php:27 | ||
138 | +msgid "source" | ||
139 | +msgstr "" | ||
140 | + | ||
141 | +#: ../templates/gnuru.tpl.php:42 ../templates/gnuru.tpl.php:47 | ||
142 | +msgid "You need help my padavan?" | ||
143 | +msgstr "" | ||
144 | + | ||
145 | +#: ../templates/gnuru.tpl.php:44 ../templates/gnuru.tpl.php:49 | ||
146 | +msgid "Wisdom" | ||
147 | +msgstr "" | ||
148 | + | ||
149 | +#: ../templates/gnuru.tpl.php:47 ../templates/gnuru.tpl.php:52 | ||
150 | +msgid "more practical help" | ||
151 | +msgstr "" | ||
152 | + | ||
153 | +#: ../templates/guestbook_form.tpl.php:15 | ||
154 | +#: ../templates/guestbook_form.tpl.php:18 ../templates/guestbook.tpl.php:12 | ||
155 | +#: ../templates/guestbook.tpl.php:13 | ||
156 | +msgid "Name" | ||
157 | +msgstr "" | ||
158 | + | ||
159 | +#: ../templates/guestbook_form.tpl.php:22 | ||
160 | +#: ../templates/guestbook_form.tpl.php:24 ../templates/guestbook.tpl.php:20 | ||
161 | +#: ../templates/guestbook.tpl.php:19 | ||
162 | +msgid "Comment" | ||
163 | +msgstr "" | ||
164 | + | ||
165 | +#: ../templates/guestbook.tpl.php:5 ../templates/guestbook.tpl.php:6 | ||
166 | +msgid "Guestbook Entries" | ||
167 | +msgstr "" | ||
168 | + | ||
169 | +#: ../templates/guestbook.tpl.php:6 ../templates/guestbook.tpl.php:7 | ||
170 | +msgid "add" | ||
171 | +msgstr "" | ||
172 | + | ||
173 | +#: ../templates/guestbook.tpl.php:25 ../templates/guestbook.tpl.php:24 | ||
174 | +msgid "No records" | ||
175 | +msgstr "" | ||
176 | + | ||
177 | +#: ../libs/oedl_ctrl.php:89 ../libs/oedl_ctrl.php:106 | ||
178 | +msgid "Error" | ||
179 | +msgstr "" |
resources/Savant2_Plugin_quote.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +/** | ||
4 | +* Base plugin class. | ||
5 | +*/ | ||
6 | +require_once 'Savant2/Plugin.php'; | ||
7 | + | ||
8 | +/** | ||
9 | +* | ||
10 | +* Outputs a quoted string. | ||
11 | +* | ||
12 | +* $Id: Savant2_Plugin_quote.php,v 1.1.1.1 2006/10/30 08:50:53 georg Exp $ | ||
13 | +* | ||
14 | +* @author Georg Steffers <georg@steffers.org> | ||
15 | +* | ||
16 | +* @package None | ||
17 | +* | ||
18 | +* @license LGPL http://www.gnu.org/copyleft/lesser.html | ||
19 | +* | ||
20 | +* This program is free software; you can redistribute it and/or modify | ||
21 | +* it under the terms of the GNU Lesser General Public License as | ||
22 | +* published by the Free Software Foundation; either version 2.1 of the | ||
23 | +* License, or (at your option) any later version. | ||
24 | +* | ||
25 | +* This program is distributed in the hope that it will be useful, but | ||
26 | +* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
27 | +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
28 | +* Lesser General Public License for more details. | ||
29 | +* | ||
30 | +*/ | ||
31 | + | ||
32 | +class Savant2_Plugin_quote extends Savant2_Plugin { | ||
33 | + | ||
34 | + /** | ||
35 | + * | ||
36 | + * Output the given string with quoted ' and ". | ||
37 | + * | ||
38 | + * @access public | ||
39 | + * | ||
40 | + * @param string $text The text to be quoted. | ||
41 | + * | ||
42 | + */ | ||
43 | + | ||
44 | + function plugin($text) | ||
45 | + { | ||
46 | + return preg_replace ('/([\'"])/i', '\\\${1}', $text); | ||
47 | + } | ||
48 | +} | ||
49 | +?> |
templates/content.tpl.php
0 → 100644
1 | +Hier würde dann etwas über meine Quellcodes stehen, an welchen | ||
2 | +Projekten ich gerade arbeite und so weiter.<BR> | ||
3 | +Evtl. Sollte ich über so etwas wie Subhirarchien nachdenken. | ||
4 | +Soll heißen, wenn Quellcodes aufgeklappt wird bekommt man erst | ||
5 | +eine Seite mit allgemeiner Information und außerdem ein weiteres | ||
6 | +Menü, in dem man auswählen kann, für welches Projekt man sich jetzt | ||
7 | +im speziellen interessiert. |
templates/error.tpl.php
0 → 100644
templates/frame.tpl.php
0 → 100644
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
2 | + "http://www.w3.org/TR/html4/loose.dtd"> | ||
3 | +<HTML> | ||
4 | + <HEAD> | ||
5 | + <TITLE><?=_('The Spirit of Freedom')?></TITLE> | ||
6 | + <META HTTP-EQUIV="content-type" CONTENT="text/html;charset=utf-8"> | ||
7 | + <LINK REL="stylesheet" TYPE="text/css" HREF="css/style.css"> | ||
8 | + | ||
9 | + <SCRIPT TYPE="text/javascript" SRC="js/common.js"></SCRIPT> | ||
10 | + <SCRIPT TYPE="text/javascript" SRC="js/dialog.js"></SCRIPT> | ||
11 | + <SCRIPT TYPE="text/javascript" SRC="js/menu.js"></SCRIPT> | ||
12 | + <SCRIPT TYPE="text/javascript" SRC="js/content.js"></SCRIPT> | ||
13 | + <SCRIPT TYPE="text/javascript" SRC="js/gnuru.js"></SCRIPT> | ||
14 | + <SCRIPT TYPE="text/javascript" SRC="js/buttons.js"></SCRIPT> | ||
15 | + </HEAD> | ||
16 | + | ||
17 | + <BODY onLoad="contentDynWidth ();"> | ||
18 | + <!-- page headline --> | ||
19 | + <DIV CLASS="headline"> | ||
20 | + <IMG SRC="images/headline.png" ALT=""> | ||
21 | + <DIV CLASS="headlineText"> | ||
22 | + <H1><?=_('The Spirit of Freedom')?></H1></DIV></DIV> | ||
23 | + <!-- end page headline --> | ||
24 | + | ||
25 | + <!-- menu --> | ||
26 | + <? include $this->loadTemplate ('menu.tpl.php') ?> | ||
27 | + <!-- end menu --> | ||
28 | + | ||
29 | + <!-- content --> | ||
30 | + <DIV ID='CONTENT' CLASS="content" STYLE="width: 680px"> | ||
31 | + <IMG SRC="images/content-bg.png" ALT=""> | ||
32 | + <DIV CLASS="contentText"> | ||
33 | + <H2><?=$this->contentHead?></H2> | ||
34 | + <? include $this->loadTemplate ($this->contentTpl) ?> | ||
35 | + </DIV> | ||
36 | + </DIV> | ||
37 | + <!-- end content --> | ||
38 | + | ||
39 | + <!-- the gnuru online wisdom --> | ||
40 | + <? include $this->loadTemplate ('gnuru.tpl.php') ?> | ||
41 | + <!-- end the gnuru online wisdom --> | ||
42 | + | ||
43 | + <!-- infomercial buttons --> | ||
44 | + <DIV ID="BUTTONS" CLASS="buttons"> | ||
45 | + <A onClick="javascript: buttonsHide ();" | ||
46 | + CLASS="buttons" HREF="#"><?=_('hide')?></A><BR> | ||
47 | + <IMG SRC="images/dbd_lg_btn.gif" ALT="defective by design"><BR> | ||
48 | + <IMG SRC="images/elim_lg_btn.gif" ALT="eliminate DRM"> | ||
49 | + </DIV> | ||
50 | + <!-- end infomercial buttons --> | ||
51 | + </BODY> | ||
52 | +</HTML> |
templates/gnuru.tpl.php
0 → 100644
1 | +<!-- fill the gnuru wisdom --> | ||
2 | + <SCRIPT TYPE="text/javascript"> | ||
3 | + <? $c=0 ?> | ||
4 | + <? foreach ($this->gnuruWisdom as $entry): ?> | ||
5 | + gnuruWisArray.push (new GnuruWisdom (document.createElement ('P'), | ||
6 | + document.createElement ('P'), | ||
7 | + document.createElement ('P'))); | ||
8 | + | ||
9 | + gnuruWisArray[<?=$c?>].getTitle ().setAttribute ( | ||
10 | + 'ID', 'GNURU_WIS_TITLE'); | ||
11 | + gnuruWisArray[<?=$c?>].getTitle ().setAttribute ( | ||
12 | + 'CLASS', 'gnuruWisTitle'); | ||
13 | + gnuruWisArray[<?=$c?>].getText ().setAttribute ( | ||
14 | + 'ID', 'GNURU_WIS_TEXT'); | ||
15 | + gnuruWisArray[<?=$c?>].getSource ().setAttribute ( | ||
16 | + 'ID', 'GNURU_WIS_SOURCE'); | ||
17 | + | ||
18 | + gnuruWisArray[<?=$c?>].getTitle ().appendChild ( | ||
19 | + document.createTextNode ( | ||
20 | + '<?=$this->plugin('quote', $entry['title'])?>')); | ||
21 | + | ||
22 | + <? foreach ($entry['text'] as $row): ?> | ||
23 | + gnuruWisArray[<?=$c?>].getText ().appendChild ( | ||
24 | + document.createTextNode ( | ||
25 | + '<?=$this->plugin('quote', $row)?>')); | ||
26 | + gnuruWisArray[<?=$c?>].getText ().appendChild ( | ||
27 | + document.createElement ('BR')); | ||
28 | + <? endforeach ?> | ||
29 | + | ||
30 | + gnuruWisArray[<?=$c?>].getSource ().appendChild ( | ||
31 | + document.createTextNode ( | ||
32 | + '<?=$this->plugin('quote', $entry['source'])?>')); | ||
33 | + | ||
34 | + <? $c++ ?> | ||
35 | + <? endforeach ?> | ||
36 | + </SCRIPT> | ||
37 | + | ||
38 | + <DIV ID="GNURU" CLASS="gnuru"> | ||
39 | + <IMG onMouseOver="javascript: gnuruWake ()" | ||
40 | + onMouseOut="javascript: gnuruMeditate ()" | ||
41 | + onClick="javascript: gnuruAsk ()" | ||
42 | + ID="GNURU_IMG" SRC="images/gnuru-trans.png" ALT=""> | ||
43 | + <DIV ONCLICK="gnuruAskEnd ()" | ||
44 | + ID="GNURU_BUBBLE" CLASS="gnuruBubble"> | ||
45 | + <IMG SRC="images/gnuru-bubble.png" ALT=""> | ||
46 | + <DIV STYLE="position: absolute; top: 25px; left: 20px; width: 80%"> | ||
47 | + <H4><?=_('You need help my padavan?')?></H4><P> | ||
48 | + - <A ONCLICK="gnuruSais ()" | ||
49 | + CLASS="gnuruBubble" HREF="#"><?=_('Wisdom')?></A><BR> | ||
50 | + - <A ONCLICK="gnuruSais ()" | ||
51 | + CLASS="gnuruBubble" | ||
52 | + HREF="#"><?=_('more practical help')?></A></DIV> | ||
53 | + </DIV> | ||
54 | + <DIV ONMOUSEUP="gnuruSilence ()" | ||
55 | + ID="GNURU_SAIS" CLASS="gnuruSais"> | ||
56 | + <IMG SRC="images/gnuru-sais.png" ALT=""> | ||
57 | + <DIV STYLE="position: absolute; | ||
58 | + width: 390px; top: 80px; left: 20px"> | ||
59 | + <P CLASS="gnuruWisTitle" ID="GNURU_WIS_TITLE"></P> | ||
60 | + <P ID="GNURU_WIS_TEXT"></P><BR> | ||
61 | + <P ID="GNURU_WIS_SOURCE"></P></DIV> | ||
62 | + </DIV> | ||
63 | + </DIV> |
templates/guestbook.tpl.php
0 → 100644
1 | +<? $url = $_SERVER['PHP_SELF'] . '?cont=guestbook&action=add' ?> | ||
2 | + | ||
3 | +<TABLE BORDER="0" BGCOLOR="#eeeeee" WIDTH="100%"> | ||
4 | + <TR> | ||
5 | + <TH COLSPAN="2" BGCOLOR="#d1d1d1"> | ||
6 | + <?=_('Guestbook Entries')?> | ||
7 | + (<A HREF="<?=$url?>" ALT=""><?=_('add')?></A>)</TH> | ||
8 | + </TR> | ||
9 | + | ||
10 | + <? if ($this->data && ! empty ($this->data)): ?> | ||
11 | + <? foreach ($this->data as $entry): ?> | ||
12 | + <TR> | ||
13 | + <TD><?=$this->_($entry['Name'])?></TD> | ||
14 | + <TD ALIGN="right"> | ||
15 | + <?=strftime ('%x %X', $entry['EntryDate'])?></TD> | ||
16 | + </TR> | ||
17 | + <TR> | ||
18 | + <TD COLSPAN="2" BGCOLOR="#dedede"> | ||
19 | + <?=$this->_($entry['Comment'])?></TD> | ||
20 | + </TR> | ||
21 | + <? endforeach ?> | ||
22 | + <? else: ?> | ||
23 | + <TR> | ||
24 | + <TD COLSPAN="2"><?=_('No records')?></TD> | ||
25 | + </TR> | ||
26 | + <? endif ?> | ||
27 | + | ||
28 | +</TABLE> |
templates/guestbook_form.tpl.php
0 → 100644
1 | +<? $url = $_SERVER['PHP_SELF'] . '?cont=guestbook&action=submit' ?> | ||
2 | + | ||
3 | +<FORM ACTION="<?=$url?>" METHOD="post"> | ||
4 | + <TABLE BORDER="1"> | ||
5 | + | ||
6 | + <? if ($this->error != 0): ?> | ||
7 | + <TR> | ||
8 | + <TD BGCOLOR="yellow" COLSPAN="2"> | ||
9 | + <?=$this->err_msg?> | ||
10 | + </TD> | ||
11 | + </TR> | ||
12 | + <? endif ?> | ||
13 | + | ||
14 | + <TR> | ||
15 | + <TD><?=_('Name')?>:</TD> | ||
16 | + <TD><INPUT TYPE="text" | ||
17 | + NAME="Name" | ||
18 | + VALUE="<?=$this->_($this->post['Name'])?>" | ||
19 | + SIZE="40"></TD> | ||
20 | + </TR> | ||
21 | + <TR> | ||
22 | + <TD VALIGN="top"><?=_('Comment')?>:</TD> | ||
23 | + <TD><TEXTAREA NAME="Comment" COLS="40" | ||
24 | + ROWS="10"><?=$this->_($this->post['Comment'])?></TEXTAREA> | ||
25 | + </TD> | ||
26 | + </TR> | ||
27 | + <TR> | ||
28 | + <TD COLSPAN="2" ALIGN="center"> | ||
29 | + <INPUT TYPE="submit" VALUE="Submit"></TD> | ||
30 | + </TR> | ||
31 | + </TABLE> | ||
32 | +</FORM> |
templates/init_err.tpl.php
0 → 100644
1 | +<HTML> | ||
2 | + <HEAD> | ||
3 | + <TITLE><?=_('The Spirit of Freedom')?></TITLE> | ||
4 | + <META HTTP-EQUIV="content-type" CONTENT="text/html;charset=utf-8"> | ||
5 | + <LINK REL="stylesheet" TYPE="text/css" HREF="css/style.css"> | ||
6 | + </HEAD> | ||
7 | + | ||
8 | + <BODY> | ||
9 | + <H1>Basic initialization error!</H1> | ||
10 | + Sorry, this version does not display any further informations about | ||
11 | + what exactly happens. This might change in future. | ||
12 | + </BODY> | ||
13 | +</HTML> |
templates/menu.tpl.php
0 → 100644
1 | +<? $pos = 100 ?> | ||
2 | +<? foreach ($this->menuItems as $menu_id => $menu_data): ?> | ||
3 | + <? | ||
4 | + $domid = "MENU_" . strtoupper ($menu_id); | ||
5 | + $url = $_SERVER['PHP_SELF'] . '?cont=' . urlencode ($menu_id); | ||
6 | + $img = ($this->contentId != $menu_id) ? | ||
7 | + 'menu-bg.png' : 'menu-bg-hilite.png'; | ||
8 | + ?> | ||
9 | + <DIV CLASS="menuItem" STYLE="top: <?=$pos?>px"> | ||
10 | + <IMG ID="<?=$domid?>" SRC="images/<?=$img?>" ALT=""> | ||
11 | + <DIV onMouseOver="javascript: menuOn ('<?=$domid?>');" | ||
12 | + onMouseOut="javascript: menuOff ('<?=$domid?>');" | ||
13 | + CLASS="menuItemText"> | ||
14 | + <A CLASS="menuItemText" | ||
15 | + HREF="<?=$url?>"><?=$menu_data[0]?></A></DIV> | ||
16 | + </DIV> | ||
17 | + <? $pos += 26 ?> | ||
18 | +<? endforeach ?> |
templates/source.tpl.php
0 → 100644
1 | +<!-- | ||
2 | + - Diese Seite sieht nicht aus wie ein schönes html templates. Das liegt | ||
3 | + - primär daran, das Sie zum größten Teil aus Text besteht, der seinerseits | ||
4 | + - übersetzt werden soll. Daher die vielen <?=_()?> im Quelltext. | ||
5 | +--> | ||
6 | +<P> | ||
7 | + <?=_('This page is related to my software projects.')?> | ||
8 | +</P> | ||
9 | +<P> | ||
10 | + <?=_('I am sad i have to say that there is no project really finished right now. Most haven\'t even started really. And some were only educational for myself.')?> | ||
11 | +</P> | ||
12 | +<P> | ||
13 | + <?=_('Anyway, i think there are some nice code examples within my sourcecodes, so i decided to put this online. Here you will also find the sourcecodes to this Webpage.')?> | ||
14 | +</P/> | ||
15 | +<P> | ||
16 | + <?=_('A Webinterface to my sourcecodes can be found ')?> | ||
17 | + <A HREF="/viewcvs/" ALT=""><?=_('here')?></A>.<BR> | ||
18 | + <?=_('To download some sources use anonymous cvs. When being asked for a password simply hit enter:')?> | ||
19 | + <PRE> | ||
20 | +cvs -d :pserver:anonymous@onkels.homelinux.org:/cvs/source login | ||
21 | +cvs -z3 -d :pserver:anonymous@onkels.homelinux.org:/cvs/source co -P <module> | ||
22 | + </PRE> | ||
23 | +</P> |
Please
register
or
login
to post a comment