<?php
	include('/var/www/html/uclit/protected/common/login/check.php');
	include('/var/www/html/uclit/protected/common/css_login/css_head2.php');
	include ('/var/www/html/uclit/protected/connections/db_arlstats.php');
	
?>
			<table border="0" width="520" cellspacing="0" cellpadding="0" align="left">
  			<!-- begin first row for logo and headline -->
  			<!-- begin blank row to provide exact spacing between first and second rows -->
  			<!-- begin third row for links and content -->
  			<tr> 

    		<!--<h2>Add a computer</h2>-->
<?php
	$adj_value = $_POST['adj_value'];
	$username = $_SESSION['username'];
	$adj_desc = $_POST['adj_desc'];
	$datetimenow = date('Y-m-d')." ".strftime("%H:%M:%S");
	$cataloger = $_POST['Personnel'];
	$location = $_POST['Location'];
	$material = $_POST['Material'];
	$catalog = $_POST['Catalog'];
	$month = $_POST['Month'];
	
	
	$db = mysql_select_db("arlstats", $arlConn) or die("Couldn't select helpcalls.");
	$sql = "INSERT INTO Current_Stats 
				(Stat_ID, Date, LID, MID, CID, UID, QID, Value, SID, Description, Username)
				VALUES 
				('','$datetimenow','$location','$material','$catalog',
					'$cataloger', '$month', '$adj_value', '4', '$adj_desc', '$username')";
	$adj_result = mysql_query($sql, $arlConn) or die("Couldn't execute query. $query_name");

		
		
?>
    <td width=490 valign="top"> <h2>Adjustments successfully added to 2007 - 2008</h2>
      <hr> 
<?php
			$mail_to = "crawfotj@ucmail.uc.edu";
			//$mail_to = "thomas.scherz@uc.edu";
			$mail_subj = "Library Technology Services (Adjustment made to ARL Report)";
			$mail_text = "The following adjustment was made by \n$username\n on  $datetimenow:\n$adj_desc\n\nwith a value of \n$adj_value";
			$mail_header = "From: libhelp@uc.edu\r\n";
			$mail_header .= "X-Mailer: server\r\n";
			$mail_header .= "Reply To: libhelp@uc.edu\r\n";
			$sendmail_param = "libhelp@uc.edu";
			mail("$mail_to","$mail_subj","$mail_text","$mail_header","-f$sendmail_param");


	echo "Adjuster:$username<br /><br />
		  Value:$adj_value<br /><br />
		  Description:$adj_desc<br /><br />
		  Date:$datetimenow<br /><br />";
?>
      <a href="http://ul.uc.edu/uclit/protected/assocdean/collstats/arl_report_adj_2008.php">Return to ARL Previous Year Adjustments (2007 - 2008)</a> 
    </td>
</table>

<?php
	include('/var/www/html/uclit/protected/common/css_login/css_foot2.php');
?>    