9086c9ad77db90633e0629e9e86a88366265ded0
bernd webinterface => /webinterface

bernd authored 17 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
15) */
bernd webinterface => /webinterface

bernd authored 17 years ago

16) 
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

17) require_once('class/database.php');
bernd add a function to handle re...

bernd authored 14 years ago

18) require_once('inc/debug.php');
bernd sql-abfragen abstrahiert

bernd authored 16 years ago

19) 
schokokeks.org web services Ermögliche Socket-Angabe fü...

schokokeks.org web services authored 10 years ago

20) function config($key, $localonly = false)
bernd Mehr config-optionen und co...

bernd authored 14 years ago

21) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

22)     global $config;
23) 
24)     if ($key == "modules") {
25)         // Stelle sicher, dass das "index"-Modul immer aktiv ist!
26)         if (! in_array("index", $config['modules'])) {
27)             $config['modules'][] = "index";
28)         }
29)         // Stelle sicher, dass das "about"-Modul immer aktiv ist!
30)         if (! in_array("about", $config['modules'])) {
31)             $config['modules'][] = "about";
32)         }
Bernd Wurst Lizenzinfos in eigenes Modu...

Bernd Wurst authored 10 years ago

33)     }
34) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

35)     if ($key == 'modules' && isset($_SESSION['restrict_modules'])) {
36)         $modules = array();
37)         foreach ($config['modules'] as $mod) {
38)             if (in_array($mod, $_SESSION['restrict_modules'])) {
39)                 $modules[] = $mod;
40)             }
41)         }
42)         return $modules;
bernd Erlaube subusers, die nur Z...

bernd authored 13 years ago

43)     }
44) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

45)     if (array_key_exists($key, $config)) {
46)         return $config[$key];
47)     }
Hanno remove whitespace in empty...

Hanno authored 5 years ago

48) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

49)     if ($localonly) {
50)         return null;
51)     }
schokokeks.org web services Ermögliche Socket-Angabe fü...

schokokeks.org web services authored 10 years ago

52) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

53)     /* read configuration from database */
54)     $result = db_query("SELECT `key`, value FROM misc.config");
Hanno remove whitespace in empty...

Hanno authored 5 years ago

55) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

56)     while ($object = $result->fetch()) {
57)         if (!array_key_exists($object['key'], $config)) {
58)             $config[$object['key']]=$object['value'];
59)         }
60)     }
61)     // Sonst wird das Passwort des webadmin-Users mit ausgegeben
62)     $debug_config = $config;
63)     unset($debug_config['db_pass']);
64)     DEBUG($debug_config);
65)     if (array_key_exists($key, $config)) {
66)         return $config[$key];
67)     } else {
68)         logger(LOG_ERR, "inc/base", "config", "Request to read nonexistant config option »{$key}«.");
69)     }
70)     return null;
bernd Mehr config-optionen und co...

bernd authored 14 years ago

71) }
72) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

73) function have_role($role)
74) {
Bernd Wurst Blende Aktionen aus, wenn d...

Bernd Wurst authored 6 years ago

75)     $have = $_SESSION['role'] & $role;
76)     if ($have) {
77)         DEBUG("Current user has role ".$role);
78)     } else {
79)         DEBUG("Current user does not have role ".$role);
80)     }
81)     return $have;
82) }
83) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

84) function get_server_by_id($id)
85) {
86)     $id = (int) $id;
87)     $result = db_query("SELECT hostname FROM system.servers WHERE id=?", array($id));
88)     $ret = $result->fetch();
89)     return $ret['hostname'];
bernd Info-Seite über Mail-Login-...

bernd authored 13 years ago

90) }
91) 
bernd Mehr config-optionen und co...

bernd authored 14 years ago

92) 
bernd add a function to handle re...

bernd authored 14 years ago

93) function redirect($target)
94) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

95)     global $debugmode;
96)     if ($target == '') {
97)         $target = $_SERVER['REQUEST_URI'];
98)     }
99)     if (! $debugmode) {
100)         header("Location: {$target}");
101)     } else {
102)         if (strpos($target, '?') === false) {
103)             print 'REDIRECT: '.internal_link($target, $target);
104)         } else {
105)             list($file, $qs) = explode('?', $target, 2);
106)             print 'REDIRECT: '.internal_link($file, $target, $qs);
107)         }
108)     }
109)     die();
bernd add a function to handle re...

bernd authored 14 years ago

110) }
111) 
112) 
bernd Hilfsfunktionen bzgl. mehre...

bernd authored 14 years ago

113) function my_server_id()
114) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

115)     $uid = (int) $_SESSION['userinfo']['uid'];
116)     $result = db_query("SELECT server FROM system.useraccounts WHERE uid=?", array($uid));
117)     $r = $result->fetch();
118)     DEBUG($r);
119)     return $r['server'];
bernd Hilfsfunktionen bzgl. mehre...

bernd authored 14 years ago

120) }
121) 
122) 
123) function additional_servers()
124) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

125)     $uid = (int) $_SESSION['userinfo']['uid'];
126)     $result = db_query("SELECT server FROM system.user_server WHERE uid=?", array($uid));
127)     $servers = array();
128)     while ($s = $result->fetch()) {
129)         $servers[] = $s['server'];
130)     }
131)     DEBUG($servers);
132)     return $servers;
bernd Hilfsfunktionen bzgl. mehre...

bernd authored 14 years ago

133) }
134) 
135) 
136) function server_names()
137) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

138)     $result = db_query("SELECT id, hostname FROM system.servers");
139)     $servers = array();
140)     while ($s = $result->fetch()) {
141)         $servers[$s['id']] = $s['hostname'];
142)     }
143)     DEBUG($servers);
144)     return $servers;
bernd Hilfsfunktionen bzgl. mehre...

bernd authored 14 years ago

145) }
146) 
147) 
bernd Neues Modul für "Kunde werden"

bernd authored 16 years ago

148) function maybe_null($value)
149) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

150)     if (! $value) {
151)         return null;
152)     }
bernd maybe_null behandelt jetzt...

bernd authored 14 years ago

153) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

154)     if (strlen((string) $value) > 0) {
155)         return (string) $value;
156)     } else {
157)         return null;
158)     }
bernd Neues Modul für "Kunde werden"

bernd authored 16 years ago

159) }
160) 
Bernd Wurst Umstellung auf PDO-Datenban...

Bernd Wurst authored 10 years ago

161) 
bernd Logger mit Logleveln

bernd authored 14 years ago

162) #define('LOG_ERR', 3);
163) #define('LOG_WARNING', 4);
164) #define('LOG_INFO', 6);
bernd Neues Modul für "Kunde werden"

bernd authored 16 years ago

165) 
bernd Logger mit Logleveln

bernd authored 14 years ago

166) function logger($severity, $scriptname, $scope, $message)
bernd Logging aktiviert

bernd authored 16 years ago

167) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

168)     if (config('logging') < $severity) {
169)         DEBUG("NOT LOGGING $scriptname:$scope:$message");
170)         return;
171)     }
172) 
173)     DEBUG("LOGGING $scriptname:$scope:$message");
174)     $user = null;
175)     if (array_key_exists("role", $_SESSION)) {
176)         if ($_SESSION['role'] & ROLE_SYSTEMUSER) {
177)             $user = $_SESSION['userinfo']['username'];
178)         } elseif ($_SESSION['role'] & ROLE_CUSTOMER) {
179)             $user = $_SESSION['customerinfo']['customerno'];
180)         }
181)     }
182) 
183)     $args = array(":user" => $user,
Bernd Wurst * Weitere Module auf prepar...

Bernd Wurst authored 10 years ago

184)                 ":remote" => $_SERVER['REMOTE_ADDR'],
185)                 ":scriptname" => $scriptname,
186)                 ":scope" => $scope,
187)                 ":message" => $message);
bernd Logging aktiviert

bernd authored 16 years ago

188) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

189)     db_query("INSERT INTO misc.scriptlog (remote, user,scriptname,scope,message) VALUES (:remote, :user, :scriptname, :scope, :message)", $args);
bernd Logging aktiviert

bernd authored 16 years ago

190) }
191) 
bernd Allow Header entries and AJAX

bernd authored 15 years ago

192) function html_header($arg)
193) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

194)     global $html_header;
195)     $html_header .= $arg;
bernd Allow Header entries and AJAX

bernd authored 15 years ago

196) }
bernd Logging aktiviert

bernd authored 16 years ago

197) 
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

198) function title($arg)
199) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

200)     global $title;
201)     $title = $arg;
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

202) }
203) 
204) function headline($arg)
205) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

206)     global $headline;
207)     $headline = $arg;
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

208) }
209) 
bernd webinterface => /webinterface

bernd authored 17 years ago

210) function output($arg)
211) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

212)     global $output;
213)     $output .= $arg;
bernd webinterface => /webinterface

bernd authored 17 years ago

214) }
215) 
Bernd Wurst Funktion für Fußnoten einge...

Bernd Wurst authored 6 years ago

216) function footnote($explaination)
217) {
218)     global $footnotes;
219)     if (!isset($footnotes) || !is_array($footnotes)) {
220)         $footnotes = array();
221)     }
222)     $fnid = array_search($explaination, $footnotes);
Bernd Wurst Bugfix für Fußnoten

Bernd Wurst authored 6 years ago

223)     DEBUG($footnotes);
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

224)     if ($fnid === false) {
Bernd Wurst Bugfix für Fußnoten

Bernd Wurst authored 6 years ago

225)         DEBUG("Footnote »{$explaination}« is not in footnotes!");
Bernd Wurst Funktion für Fußnoten einge...

Bernd Wurst authored 6 years ago

226)         $footnotes[] = $explaination;
227)     }
228)     $fnid = array_search($explaination, $footnotes);
229)     return str_repeat('*', ($fnid+1));
230) }
bernd webinterface => /webinterface

bernd authored 17 years ago

231) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

232) function random_string($len)
Bernd Wurst random_string() verwendet u...

Bernd Wurst authored 7 years ago

233) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

234)     $s = str_replace('+', '.', base64_encode(random_bytes(ceil($len*3/4))));
235)     return substr($s, 0, $len);
Bernd Wurst random_string() verwendet u...

Bernd Wurst authored 7 years ago

236) }
bernd webinterface => /webinterface

bernd authored 17 years ago

237) 
238) 
239) function are_you_sure($query_string, $question)
240) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

241)     $query_string = encode_querystring($query_string);
242)     $token = random_string(20);
243)     $_SESSION['are_you_sure_token'] = $token;
244)     title('Sicherheitsabfrage');
245)     output("
bernd * alle internen Links sinnv...

bernd authored 15 years ago

246)     <form action=\"{$query_string}\" method=\"post\">
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

247)     <div class=\"confirmation\">
248)       <div class=\"question\">{$question}</div>
249)       <p class=\"buttons\">
250)         <input type=\"hidden\" name=\"random_token\" value=\"{$token}\" />
251)         <input type=\"submit\" name=\"really\" value=\"Ja\" />
bernd Entities repariert

bernd authored 16 years ago

252)         &#160; &#160;
bernd Umfangreiche Code-Aufräumar...

bernd authored 16 years ago

253)         <input type=\"submit\" name=\"not_really\" value=\"Nein\" />
254)       </p>
255)     </div>");
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

256)     output("</form>\n");
bernd webinterface => /webinterface

bernd authored 17 years ago

257) }
258) 
259) 
260) function user_is_sure()
261) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

262)     if (isset($_POST['really'])) {
263)         if ($_POST['random_token'] == $_SESSION['are_you_sure_token']) {
264)             return true;
265)         } else {
266)             system_failure("Possible Cross-site-request-forgery detected!");
267)         }
268)     } elseif (isset($_POST['not_really'])) {
269)         return false;
270)     } else {
271)         return null;
272)     }
bernd webinterface => /webinterface

bernd authored 17 years ago

273) }
274) 
275) 
276) 
bernd XSRF-kram fixed

bernd authored 16 years ago

277) function generate_form_token($form_id)
278) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

279)     require_once("inc/debug.php");
280)     $sessid = session_id();
281)     if ($sessid == "") {
282)         DEBUG("Uh? Session not running? Wtf?");
283)         system_failure("Internal error!");
284)     }
285)     if (! isset($_SESSION['session_token'])) {
286)         $_SESSION['session_token'] = random_string(10);
287)     }
288)     return hash('sha256', $sessid.$form_id.$_SESSION['session_token']);
bernd XSRF-kram fixed

bernd authored 16 years ago

289) }
290) 
291) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

292) function check_form_token($form_id, $formtoken = null)
bernd XSRF-kram fixed

bernd authored 16 years ago

293) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

294)     if ($formtoken == null) {
295)         $formtoken = $_REQUEST['formtoken'];
296)     }
297)     $sessid = session_id();
298)     if ($sessid == "") {
299)         DEBUG("Uh? Session not running? Wtf?");
300)         system_failure("Internal error! (Session not running)");
301)     }
302) 
303)     $correct_formtoken = hash('sha256', $sessid.$form_id.$_SESSION['session_token']);
304) 
305)     if (! ($formtoken == $correct_formtoken)) {
306)         system_failure("Possible cross-site-request-forgery!");
307)     }
bernd XSRF-kram fixed

bernd authored 16 years ago

308) }
309) 
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

310) 
bernd Zeige Links auf dem Startse...

bernd authored 14 years ago

311) function have_module($modname)
312) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

313)     return in_array($modname, config('modules'));
bernd Zeige Links auf dem Startse...

bernd authored 14 years ago

314) }
315) 
316) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

317) function use_module($modname)
Bernd Wurst Rudimentäre Adressauswahl/D...

Bernd Wurst authored 6 years ago

318) {
Bernd Wurst Aktualisiere Domain- und In...

Bernd Wurst authored 6 years ago

319)     global $prefix, $needed_modules;
320)     if (! isset($needed_modules)) {
321)         $needed_modules = array();
322)     }
323)     if (in_array($modname, $needed_modules)) {
324)         return;
325)     }
326)     $needed_modules[] = $modname;
Bernd Wurst Rudimentäre Adressauswahl/D...

Bernd Wurst authored 6 years ago

327)     if (! have_module($modname)) {
328)         system_failure("Soll nicht verfügbares Modul laden!");
329)     }
330)     /* setup module include path */
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

331)     ini_set('include_path', ini_get('include_path').':./modules/'.$modname.'/include:');
Bernd Wurst Rudimentäre Adressauswahl/D...

Bernd Wurst authored 6 years ago

332)     $style = 'modules/'.$modname.'/style.css';
333)     if (file_exists($style)) {
334)         html_header('<link rel="stylesheet" href="'.$prefix.$style.'" type="text/css" />'."\n");
335)     }
336) }
337) 
338) 
bernd * alle internen Links sinnv...

bernd authored 15 years ago

339) function encode_querystring($querystring)
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

340) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

341)     global $debugmode;
342)     if ($debugmode) {
343)         $querystring = 'debug&'.$querystring;
344)     }
345)     $query = explode('&', $querystring);
346)     $new_query = array();
347)     foreach ($query as $item) {
348)         if ($item != '') {
349)             $split = explode('=', $item, 2);
350)             if (count($split) == 1) {
351)                 $new_query[] = $split[0];
352)             } else {
353)                 $new_query[] = $split[0].'='.urlencode($split[1]);
354)             }
355)         }
356)     }
357)     $querystring = implode('&amp;', $new_query);
358)     if ($querystring) {
359)         $querystring = '?'.$querystring;
360)     }
361)     return $querystring;
bernd * alle internen Links sinnv...

bernd authored 15 years ago

362) }
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

363) 
bernd * alle internen Links sinnv...

bernd authored 15 years ago

364) 
Bernd Wurst Beta-Hinweis eingefügt

Bernd Wurst authored 6 years ago

365) function beta_notice()
366) {
367)     output('<div class="beta"><h4>Achtung: Testbetrieb</h4><p>Diese Funktion ist im Testbetrieb. Bei Fehlfunktionen, Unklarheiten oder Verbesserungsvorschlägen bitten wir um kurze Nachricht an <a href="mailto:root@schokokeks.org">root@schokokeks.org</a></p></div>');
368) }
369) 
370) 
Bernd Wurst Google-Auth-Token setzen un...

Bernd Wurst authored 11 years ago

371) function addnew($file, $label, $querystring = '', $attribs = '')
bernd addnew() eingeführt

bernd authored 14 years ago

372) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

373)     output('<p class="addnew">'.internal_link($file, $label, $querystring, $attribs).'</p>');
bernd addnew() eingeführt

bernd authored 14 years ago

374) }
375) 
bernd * alle internen Links sinnv...

bernd authored 15 years ago

376) 
377) function internal_link($file, $label, $querystring = '', $attribs = '')
378) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

379)     global $prefix;
380)     if (strpos($file, '/') === 0) {
381)         $file = $prefix.substr($file, 1);
382)     }
383)     $querystring = encode_querystring($querystring);
384)     return "<a href=\"{$file}{$querystring}\" {$attribs} >{$label}</a>";
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

385) }
386) 
387) 
388) function html_form($form_id, $scriptname, $querystring, $content)
389) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

390)     $querystring = encode_querystring($querystring);
391)     $ret = '';
392)     $ret .= '<form id="'.$form_id.'" action="'.$scriptname.$querystring.'" method="post">'."\n";
393)     $ret .= '<p style="display: none;"><input type="hidden" name="formtoken" value="'.generate_form_token($form_id).'" /></p>'."\n";
394)     $ret .= $content;
395)     $ret .= '</form>';
396)     return $ret;
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

397) }
398) 
399) 
bernd * wie viele Reihen wurden a...

bernd authored 15 years ago

400) function html_select($name, $options, $default='', $free='')
bernd Neues Modul für "Kunde werden"

bernd authored 16 years ago

401) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

402)     require_once('inc/security.php');
403)     $ret = "<select name=\"{$name}\" id=\"{$name}\" size=\"1\" {$free} >\n";
404)     foreach ($options as $key => $value) {
405)         $selected = '';
406)         if ($default == $key) {
407)             $selected = ' selected="selected" ';
408)         }
409)         $key = filter_input_general($key);
410)         $value = filter_input_general($value);
411)         $ret .= "  <option value=\"{$key}\"{$selected}>{$value}</option>\n";
412)     }
413)     $ret .= '</select>';
414)     return $ret;
bernd Neues Modul für "Kunde werden"

bernd authored 16 years ago

415) }
416) 
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

417) 
bernd Neue Funktion zur Anzeige e...

bernd authored 12 years ago

418) function html_datepicker($nameprefix, $timestamp)
419) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

420)     $valid_days = array( 1 =>  1,  2 =>  2,  3 =>  3,  4 =>  4,  5 =>  5,
bernd Neue Funktion zur Anzeige e...

bernd authored 12 years ago

421)                        6 =>  6,  7 =>  7,  8 =>  8,  9 =>  9, 10 => 10,
422)                       11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15,
423)                       16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20,
424)                       21 => 21, 22 => 22, 23 => 23, 24 => 24, 25 => 25,
425)                       26 => 26, 27 => 27, 28 => 28, 29 => 29, 30 => 30,
426)                       31 => 31);
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

427)     $valid_months = array( 1 =>  1,  2 =>  2,  3 =>  3,  4 =>  4,  5 =>  5,
bernd Neue Funktion zur Anzeige e...

bernd authored 12 years ago

428)                          6 =>  6,  7 =>  7,  8 =>  8,  9 =>  9, 10 => 10,
429)                         11 => 11, 12 => 12);
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

430)     $current_year = (int) date('Y');
431)     $valid_years = array($current_year => $current_year,
bernd Datums-Check und Daten in u...

bernd authored 12 years ago

432)                        $current_year+1 => $current_year+1,
433)                        $current_year+2 => $current_year+2,
434)                        $current_year+3 => $current_year+3,
435)                        $current_year+4 => $current_year+4);
Hanno remove whitespace in empty...

Hanno authored 5 years ago

436) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

437)     $selected_day = date('d', $timestamp);
438)     $selected_month = date('m', $timestamp);
439)     $selected_year = date('Y', $timestamp);
440)     $ret = '';
441)     $ret .= html_select($nameprefix.'_day', $valid_days, $selected_day, 'style="text-align: right;"').". ";
442)     $ret .= html_select($nameprefix.'_month', $valid_months, $selected_month, 'style="text-align: right;"').". ";
443)     $ret .= html_select($nameprefix.'_year', $valid_years, $selected_year);
444)     return $ret;
bernd Neue Funktion zur Anzeige e...

bernd authored 12 years ago

445) }
446) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

447) function get_modules_info()
bernd Index-Blöcke werden jetzt v...

bernd authored 12 years ago

448) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

449)     $modules = config('modules');
450)     $modconfig = array();
451)     foreach ($modules as $name) {
452)         $modconfig[$name] = null;
453)         if (file_exists('modules/'.$name.'/module.info')) {
454)             $modconfig[$name] = parse_ini_file('modules/'.$name.'/module.info');
455)         }
456)     }
457)     return $modconfig;