Location: PHPKode > projects > Course-manager > courseman-0.1.1/template-absenden.php
<?php header("Content-type: text/html; charset=utf-8"); ?>
<?php
  header('Cache-Control: no-store');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?=ucfirst($lang_course_registration[$language])?></title>
<link rel="stylesheet"
      href="local.css"
      type="text/css">
<?=$local_stylesheets?>
</head>
<body>
<?=conditional_layout_before_content(ucfirst(
		$lang_course_registration[$language]))?>
<?php
  check_proceeding();
  $gueltig = (pg_numrows(db_exec($verbindung,
    			"SELECT * FROM valid_registration "
  			. "WHERE registration=$registration_id;")) > 0);
  if($gueltig || $debug["old-debug"]) {
?>
<h1>
<?=$lang_personal_data[$language]?>
</h1>
<table>
<?php
    $personal_data['calls']($personal_data,
                            'input_echo',
                            array($registration_id));
    print_personal_information($verbindung);
    db_exec($verbindung,"START TRANSACTION;");
    db_exec($verbindung,"LOCK TABLE registration_person;");
    $ergebnis = db_exec($verbindung,
  			"SELECT login "
			. "FROM registration_person,person_login "
			. "WHERE registration=$registration_id "
			. "AND registration_person.person="
			. "person_login.person;");
    db_exec($verbindung,"COMMIT;");
    for ($lt = 0;  $lt < pg_numrows($ergebnis); $lt++) {
      $login = pg_result($ergebnis, $lt, 0);
      $aenderungslink = "http://" . $_SERVER["SERVER_NAME"]
  				. str_replace("absenden",
						"aenderung",
						$_SERVER["REQUEST_URI"])
				. "?user=$login";
      $bestaetigungsmail .= $lang_link[$language] . ' '
				. $lang_change_registration[$language] . ": "
				. "$aenderungslink\n";
      $bestaetigungsmail .= ucfirst($lang_password[$language]) . ' '
				. $lang_change_registration[$language] . ": "
				. "$passwort\n";
?>
<tr>
<td>
<b>
<?=$lang_link[$language] . ' ' . $lang_change_registration[$language]?>
(<?=$lang_please_save[$language]?>)
</b>
</td>
<td>
<a href="<?php echo $aenderungslink; ?>"><?=$aenderungslink?></a>
</td>
</tr>
<tr>
<td>
<b>
<?=ucfirst($lang_password[$language])
		. ' ' . $lang_change_registration[$language]?>
</b>
</td>
<td>
<span style='font-family:"Courier New",Courier,monospace'>
<?php echo $passwort; ?>
</span>
</td>
</tr>
<?php
    }
?>
</table>
<?php
  }
  if ($_POST["kursanzahl"] != "0") {
    if (!$gueltig) {
      print("<br/>
<span class='fehler'>
" . $lang_multiple_registrations[$language] . "
</span>\n");
    } else {
?>
<h1>
<?=$lang_course_data[$language]?>
</h1>
<?php
      $bestaetigungsmail .= "
" . $lang_course_data[$language] . ":";
      $anmeldungen = db_exec($verbindung,
  			"SELECT id "
		  	. "FROM registration_course "
			. "WHERE registration=$registration_id;");
      for ($lt = 0;  $lt < pg_numrows($anmeldungen); $lt++) {
        $bestaetigungsmail .= "\n";
        print("<br/>
<table border=1>\n");
        $anmeldung = pg_result($anmeldungen, $lt, 0);
        $erste = db_exec($verbindung,
    			"SELECT category.name,course.name,"
    			. "description,commentary "
			. "FROM $course_date_readable,course,category,"
			. ($course_date_translated ? "language," : "")
			. "registration_course "
			. "WHERE $course_date_readable.id="
			. "registration_course.course "
			. "AND course_period=$course_period "
			. "AND $course_date_readable.course=course.id "
			. "AND category=category.id "
			. ($course_date_translated
				? ("AND code='$language' "
					. "AND language=language.id ")
				: "")
			. "AND registration_course.id=$anmeldung;");
        for ($row = 0;  $row < pg_numrows($erste); $row++) {
          $col = 0;
          $kategorie = pg_result($erste, $row, $col++);
          $kurs = pg_result($erste, $row, $col++);
          $termin = pg_result($erste, $row, $col++);
          $commentary = pg_result($erste, $row, $col++);
          print("<tr>
<td>
<b>
$application_specific_category
</b>
</td>
<td>
$kategorie
</td>
</tr>
<tr>
<td>
<b>
" . $lang_course[$language] . "
</b>
</td>
<td>
$kurs
</td>
</tr>
<tr>
<td>
<b>
" . $lang_date[$language] . "
</b>
</td>
<td>
$termin
</td>
</tr>\n");
          $bestaetigungsmail .= $lang_registered[$language] . " "
				. $lang_course[$language] . ":
$kategorie
$kurs
$termin\n";
        }
      $zweite = db_exec($verbindung,
    			"SELECT course.name,"
    			. "description "
			. "FROM $course_date_readable,course,"
			. ($course_date_translated ? "language," : "")
			. "registration_course "
			. "WHERE $course_date_readable.id="
			. "registration_course.secondary "
			. "AND course_period=$course_period "
			. "AND $course_date_readable.course=course.id "
			. ($course_date_translated
				? ("AND code='$language' "
					. "AND language=language.id ")
				: "")
			. "AND registration_course.id=$anmeldung;");
        for ($i = 0;  $i < pg_numrows($zweite); $i++) {
          $kurs = pg_result($zweite, $i, 0);
          $termin = pg_result($zweite, $i, 1);
          print("<tr>
<td>
<b>
" . $lang_secondary[$language] . ":
</b>
</td>
</tr>
<tr>
<td>
<b>
" . $lang_course[$language] . "
</b>
</td>
<td>
$kurs
</td>
</tr>
<tr>
<td>
<b>
" . $lang_date[$language] . "
</b>
</td>
<td>
$termin
</td>
</tr>\n");
          $bestaetigungsmail .= $lang_secondary[$language] . ":
$kategorie
$kurs
$termin\n";
        }
        print("<tr>
<td>
<b>
" . $lang_comments[$language] . "
</b>
</td>
<td>
$commentary
</td>
</tr>
</table>\n");
      }
      if ($gueltig && $_POST["email"] != "") {
        print("<p>");
        $subject = ucfirst(possessive($language,2,"polite","female"))
			. " " . $lang_course_registration[$language];
        $headers = "From: $system_reply_address\r
Content-type: text/plain; charset=utf-8";
        $options = $set_envelope_header ? "-f $system_reply_address" : "";
        if (mail($_POST["email"],
			$subject,
			$bestaetigungsmail,
			$headers,
			$options)) {
          print($lang_confirmation_sent[$language] . "!");
        } else {
          print($lang_error[$language] . ": "
		. $lang_confirmation_not_sent[$language] . "!");
        }
        print("</p>");
      }
    }
  } else {
    print("<h1>" . $lang_registration_deleted[$language] . "!</h1>\n");
  }
?>
<br />
<?=$impressum_link?>
<?=conditional_layout_after_content()?>
</body>
</html>
Return current item: Course-manager