<?php
$registration_notification = array(
'en' => "Your course registration was successful.
This is an automatically created message.
Please don't try to reply!",
'de' => "Ihre Kursanmeldung war erfolgreich.
Dies ist eine automatisch erzeugte Nachricht.
Bitte versuchen Sie nicht, darauf zu antworten!");
$confirmation_notification = array(
'en' => "This is an automatically created message.
Please don't try to reply!",
'de' => "Dies ist eine automatisch erzeugte Nachricht.
Bitte versuchen Sie nicht, darauf zu antworten!");
require('config.php'); /* variables defined before this line can easily
be configured in config.php*/
if ($debug["requests"]) {
require_once('sql.php');
$verbindung = database_connection($lang_database_failure[$language]);
db_exec($verbindung, "INSERT INTO request_log (request) "
. "SELECT '"
. pg_escape_string($_SERVER["REQUEST_URI"])
. "';");
db_close($verbindung);
}
require_once('abstractions.php');
require_once('data-schema.php');
$registration_end_time_hard_limit = $registration_end_time + (30 * 60);
function login_query_clauses($login,$password) {
return "staff_authorization.name='" . pg_escape_string($login)
. "' AND staff_authorization.hashed_password="
. "md5(staff_authorization.salt||'"
. pg_escape_string($password) . "')";
}
function javascript_string($raw) {
return "'" . str_replace('
', "\r
", str_replace('
', "\\n'
+ '", str_replace("\r
", '
', $raw))) . "'";
}
function generated_password($size) {
$zeichen = "0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
for ($i = 0; $i < $size; $i++) {
$passwort .= substr($zeichen, mt_rand(0, strlen($zeichen) - 1), 1);
}
return $passwort;
}
$denied = false;
$denial_notice;
function check_registration_period() {
global $registration_begin_time;
global $registration_end_time;
global $registration_end_time_hard_limit;
global $denied,$denial_notice,$language;
if (time() < $registration_begin_time) {
$denied = true;
$denial_notice = '<span class="fehler">'
. lang_too_early($language,$registration_begin_time)
. '</span>';
return;
}
if (time() > $registration_end_time_hard_limit) {
$denied = true;
$denial_notice = '<span class="fehler">'
. lang_too_late($language,$registration_end_time)
. '</span>';
return;
}
}
function die_pretty() {
?>
<?=conditional_layout_after_content()?>
</body>
</html>
<?php
exit(0);
}
function check_proceeding() {
global $layout_after_content,$lang_registration_error,$lang_complete;
global $denied,$denial_notice,$omission_alerts,$personal_data,$language;
if ($denied) {
?>
<?=$denial_notice?>
<?php
die_pretty();
}
if ($omission_alerts != "") {
?>
<span class='fehler'>
<b><?=$lang_registration_error[$language]?></b>
<?=$omission_alerts?>
<form action='anmeldung.php' method='POST'>
<?=$personal_data['calls']($personal_data,'hidden_value_pass',array())?>
<?=course_data_pass()?>
<input type='SUBMIT' value='<?=$lang_complete[$language]?>' />
</form>
</span>
<?php
die_pretty();
}
}
function rtf_unicode($string) {
$out = "";
$combined = 0;
$bytes = 1;
for ($i = 0;$i < strlen($string);$i++) {
$code = ord($string{$i});
if ($bytes == 1) {
if ($code<0x80) {
$out .= $string{$i};
} else {
$bytes = 2;
$combined = ($code & 0x1f) << 6;
}
} else {
$combined += $code & 0x3f;
$out .= "\\u" . $combined . "?";
$bytes = 1;
}
}
return $out;
}
?>