Location: PHPKode > projects > Course-manager > courseman-0.1.1/delete-course.php
<?php
  require('global-php.php');
  $verbindung = database_connection($lang_database_failure[$language]);
  $PHP_AUTH_USER = $_SERVER["PHP_AUTH_USER"];
  $PHP_AUTH_PW = $_SERVER["PHP_AUTH_PW"];
  $ergebnis = db_exec($verbindung,
			"SELECT * FROM staff_authorization,superuser "
				. "WHERE superuser.account"
				. "=staff_authorization.id "
				. "AND "
				. login_query_clauses(
					$PHP_AUTH_USER,
					$PHP_AUTH_PW)
				. ";");
  if (pg_numrows($ergebnis) < 1) {
    header('WWW-Authenticate: Basic realm="Kursverwaltung"');
    header("HTTP/1.0 401 Unauthorized");
    echo $lang_authentication_failure[$language];
    db_close($verbindung);
    exit;
  }
  $course = intval($_REQUEST["course"]);
  $course_period = option_value($course_period_option);
  db_exec($verbindung, "DELETE FROM $course_date WHERE id=$course;");
  db_close($verbindung);
?>
Return current item: Course-manager