<html>
<head>
<title>Staff Advisory Committee Strategic Plan Representative Election Nomination 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 FName, LName, auth, email 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'];
		$flname = $lname.",".$fname;
		$fname = $row['FLName'];
		$auth = $row['auth'];
		$email = $row['email'];
		$mail_to = $email;
		$mail_subj = "Staff Advisory Committee Nominations for Strategic Plan Representative.- REMINDER.";
		$mail_text = "Remember.  You have until December 7th to " .
       "submit nominations for the Staff Advisory Committee Strategic Plan Representative election. \n" .
		   " \n" .
		   "NOTICE.  Please check the JUNK Email Folder " .
       "for any emails from the APACHE emailer.  Some of the SAC nominations ended up in JUNK EMAIL. \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>
