<html>
<head>
<title>Staff Advisory Committee Nomination for Strategic Plan Representative Letter</title>
</head>
<body>

<?php
	$dbserver = 'libitdb.lang.uc.edu';
	$dbuser = 'phpadmin';
	$dbpass = '25or624';
	$db = 'systems';
	$sqlConn = @mysql_connect($dbserver, $dbuser, $dbpass) or die("Couldn't connect to server");
	$dbConn = @mysql_select_db($db, $sqlConn) or die("Couldn't select database: $db");
	
	$sql_vote = "Select sacREP.FName, sacREP.LName, sacREP.email, sacREP.auth
From sacREP
Order By LName
";
	$vote_result = @mysql_query($sql_vote, $sqlConn) or die("Couldn't execute query. $sql_vote");
	
	while ($row = mysql_fetch_array($vote_result))
	{
		$fname = $row['FName'];
		$lname = $row['LName'];
		$auth = $row['auth'];
		$email = $row['email'];
		$mail_to = $email;
		$mail_subj = "Staff Advisory Committee Nomination for Strategic Plan Representative.";
		$mail_text = "The time of year has come to elect a new member to serve " .
       "you as the Staff Advisory Committee member on Strategic Planning Committee.  This year nominations " .
       "will be taken between December 3rd and December 7th. \n" .
		   "Voting will be done between December 10th and December 14th.\n" .
		   " \n" .
       "The person will represent the classified and " .
       "unclassified staff on the Strategic Planning Committee; provides input as requested " .
       "on proposed policies and programs and shares information " .
       "accordingly with the staff at large. The member will serve for one year\n" .
       " \n" .
  		 "To nominate a fellow staff member, please click on the link below.\n" .
 			 " \n" .
			 "Click here to nominate: http://ul.uc.edu/groups/SAC/elections_rep/nominate \n" ;
  
	
		$mail_header = "From: sac@mail.libraries.uc.edu\r\n";
		$mail_header .= "X-Mailer: server\r\n";
		$mail_header .= "Reply To: sac@mail.libraries.uc.edu\r\n";
		$sendmail_param = "sac@mail.libraries.uc.edu";
		
		mail("$mail_to","$mail_subj","$mail_text","$mail_header","-f$sendmail_param");
	}
	echo"Mail sent successfully.";

?>
</body>
</html>
