HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //home/awaldron/public_html/archive/demo/coursereg_list.php
<?php
session_start();
?>

<html>
<head>
<title><-Vocollect Inc.-> Attendees List</title>
</head>
<link rel="stylesheet" type="text/css" href="default.css">

<?php

include("_functions.php");
dbconnect();

$sql = "SELECT * FROM tbl_courses, tbl_course_sched WHERE tbl_course_sched.sched_id=".$_GET["sid"]." AND tbl_course_sched.course_id=tbl_courses.course_id";
$result = mysql_query($sql);
extract(mysql_fetch_array($result));

if (isset($_GET["delete"])) {
	
	$sql = "DELETE FROM tbl_course_att WHERE sched_id=".$_GET["sid"]." AND attendee='".$_GET["delete"]."' LIMIT 1";
	$result = mysql_query($sql);
	if ($result) echo notice("Attendee removed successfully");
	else echo error("There was an error when attempting to make the change.");
	echo "<body style=\"margin:15px;font-size:12px;\" onLoad=\"window.opener.location='/coursereg.php?id=".$_GET["id"]."';this.close();\">\n";
}

	echo "<body style=\"margin:15px;font-size:12px;\">\n";
	
	$course_size = (!zero($cust_seats)?$cust_seats:$course_size);
	echo "<P><span class=\"subhead\">".$course_name."</span>\n";
	echo "<br><b>".date("g:i a",$start)." - ".date("g:i a",$end)."</b>\n";
	
	echo "<P>If you wish to <b style=\"color:#DD0000;\">cancel</b> your registration for this class, click the <a href=\"#\">remove</a> link next to your name.\n";
	
	$sql = "SELECT * FROM tbl_course_att WHERE sched_id=".$_GET["sid"]." ORDER BY attendee ASC";
	$result = mysql_query($sql);
	echo "<P><b>Attendees:</b>\n<ol>\n";
	for ($i=0; $i < $course_size; $i++) {
		$k = mysql_fetch_array($result);
		echo "<li> ".$k["attendee"];
		if ($k["username"] == $_SESSION["auth_user"]) echo " (<a href=\"coursereg_list.php?id=".$_GET["id"]."&delete=".$k["attendee"]."&sid=".$k["sched_id"]."\">remove</a>)\n";
	}
	echo "</ul>\n";
	
?>

</body>
</html>