<commit_before><?PHP
require_once("./include/volunteer.php");

if(!$volunteer->CheckLogin())
{
    $volunteer->RedirectToURL("login.php");
    exit;
}
if(isset($_POST['submit'])){
	if (!empty($_POST['check_list'])){
		if ($volunteer->PairStudent()){
			$volunteer->RedirectToURL("thank-you-volunteer.html");
		}
	} else {
		echo "<b>Please Select at Least One Option.</b>";
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
      <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
      <title>Pair up with Students</title>
      <link rel="STYLESHEET" type="text/css" href="style/main.css">
      <link rel="STYLESHEET" type="text/css" href="../../tablesorter/themes/blue/style.css">
      <script type="text/javascript" src="../../tablesorter/jquery-latest.js"></script> 
	  <script type="text/javascript" src="../../tablesorter/jquery.tablesorter.js"></script> 
      
</head>

<body>
<div id='fg_membersite_content'>
<h2>DCSSA Airport Pickup Manager</h2>


<?php
if(!$volunteer->DBLogin()){
   $volunteer->HandleError("Database login failed!");
   exit;
}
echo "<form id='main' action='' method='post' accept-charset='UTF-8'>";
echo "<table id='main-table' border='0' cellpadding='0' cellspacing='0' class='tablesorter'> 
<thead><tr>
<th width='20px' position='fixed' />
<th width='200px' position='fixed'>接机日期</th> 
<th width='200px' >接机时间</th>
<th width='150px'>航班号</th>
<th width='50px'>人数</th>
<th width='300px'>行李</th>
<th>我要接这名学生</th>
</tr></thead><tbody>";

$qry = "Select * from $volunteer->table_stu where confirmcode='y' and volunteer is null";
$result = mysql_query($qry,$volunteer->connection);
$count = 0;
while($row = mysql_fetch_array($result) ) {
	$count = $count + 1;
	$email = $row['email'];
	echo "<tr>";
	echo "<td>" . $count . "</td>";
	echo "<td>" . $row['date'] . "</td>";
	echo "<td>" . $row['time'] . "</td>";
	echo "<td>" . $row['flight'] . "</td>";
	echo "<td>" . $row['nump'] . "</td>";
	echo "<td>" . $row['numc'] . "</td>";
	//echo "<td style='width: 150px; border: 1px solid black;'>" . $row['email'] . "</td>";
	echo "<td>"."<input type='checkbox' name='check_list[]' value=$email >"."</td>";
	echo "</tr>";

}
echo "</tbody></table>";
$msg = "是否继续？";
echo "<input type='submit' name='submit' value='提交(Submit)' onclick='return confirm($msg)' />";
echo "<p>*点击提交后，您和待接机的学生都会收到邮件</p>";
echo "</form>";
?> 

<div><span class='error'><?php echo $volunteer->GetErrorMessage(); ?></span></div>

<script type="text/javascript">
	$(document).ready(function() 
    { 
        $("#main-table").tablesorter(); 
    } 
	); 

</script>
<p>
Logged in as: <?= $volunteer->UserFullName() ?>
</p>
<p>
<a href='login-home.php'>Home</a>
</p>
</div>
</body>
</html><commit_msg>Added a confirm dialog<commit_after><?PHP
require_once("./include/volunteer.php");

if(!$volunteer->CheckLogin())
{
    $volunteer->RedirectToURL("login.php");
    exit;
}
if(isset($_POST['submit'])){
	if (!empty($_POST['check_list'])){
		if ($volunteer->PairStudent()){
			$volunteer->RedirectToURL("thank-you-volunteer.html");
		}
	} else {
		echo "<b>Please Select at Least One Option.</b>";
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
      <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
      <title>Pair up with Students</title>
      <link rel="STYLESHEET" type="text/css" href="style/main.css">
      <link rel="STYLESHEET" type="text/css" href="../../tablesorter/themes/blue/style.css">
      <script type="text/javascript" src="../../tablesorter/jquery-latest.js"></script> 
	  <script type="text/javascript" src="../../tablesorter/jquery.tablesorter.js"></script> 
      
</head>

<body>
<div id='fg_membersite_content'>
<h2>DCSSA Airport Pickup Manager</h2>


<?php
if(!$volunteer->DBLogin()){
   $volunteer->HandleError("Database login failed!");
   exit;
}
echo "<form id='main' action='' method='post' accept-charset='UTF-8'>";
echo "<table id='main-table' border='0' cellpadding='0' cellspacing='0' class='tablesorter'> 
<thead><tr>
<th width='20px' position='fixed' />
<th width='200px' position='fixed'>接机日期</th> 
<th width='200px' >接机时间</th>
<th width='150px'>航班号</th>
<th width='50px'>人数</th>
<th width='300px'>行李</th>
<th>我要接这名学生</th>
</tr></thead><tbody>";

$qry = "Select * from $volunteer->table_stu where confirmcode='y' and volunteer is null";
$result = mysql_query($qry,$volunteer->connection);
$count = 0;
while($row = mysql_fetch_array($result) ) {
	$count = $count + 1;
	$email = $row['email'];
	echo "<tr>";
	echo "<td>" . $count . "</td>";
	echo "<td>" . $row['date'] . "</td>";
	echo "<td>" . $row['time'] . "</td>";
	echo "<td>" . $row['flight'] . "</td>";
	echo "<td>" . $row['nump'] . "</td>";
	echo "<td>" . $row['numc'] . "</td>";
	//echo "<td style='width: 150px; border: 1px solid black;'>" . $row['email'] . "</td>";
	echo "<td>"."<input type='checkbox' name='check_list[]' value=$email >"."</td>";
	echo "</tr>";

}
echo "</tbody></table>";
$msg = "是否继续？";
echo "<input type='submit' name='submit' value='提交(Submit)'/>";
echo "<p>*点击提交后，您和待接机的学生都会收到邮件</p>";
echo "</form>";
?> 

<div><span class='error'><?php echo $volunteer->GetErrorMessage(); ?></span></div>

<script type="text/javascript">
	$(document).ready(function() 
    { 
        $("#main-table").tablesorter(); 
    } 
	); 

	$("#main").submit(function() {
		return confirm("请确认要接这些学生","确认提交");
	});

</script>
<p>
Logged in as: <?= $volunteer->UserFullName() ?>
</p>
<p>
<a href='login-home.php'>Home</a>
</p>
</div>
</body>
</html>
{'fraction_non_alphanumeric': 0.25930413709537825, 'fraction_numerical': 0.013848018002423404, 'mean_word_length': 4.609708737864078, 'pattern_counts': {'":': 0, '<': 169, '<?xml version=': 0, '>': 189, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2597341', 'n_tokens_mistral': 2315, 'n_tokens_neox': 2245, 'n_words': 407}