<!--includes for all the database connections-->

<!--loads the php code to connect to databases and queries -->

<!--begin html-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/final_php.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!--template parameters-->
<!--use this editable area to add an additional style sheet-->

<!-- InstanceBeginEditable name="doctitle" -->
<title>Intranet</title>
<!-- InstanceEndEditable -->
<!-- use the editable area below to add any additional head items-->
<!--code to load css for page and menus-->
<?php require_once('../../../int05c/incs/loadcss.inc'); ?>
<?php require_once('../../../int05c/incs/loadscripts.inc'); ?>
<!--menu hack-->
<!--[if gte IE 5]>
<style>#p7TMnav div a {width: 100%;}</style>
<![endif]-->
<!-- InstanceBeginEditable name="head" -->

<!-- InstanceEndEditable -->
</head>
<body onload="P7_swapClass(0,'none','open','closed','li')"> 
   <div class="skipLinks">
     skip to: <a href="#content">page content</a> | <a href="/pageNav">links on this page</a> | <a     href="#globalNav">site navigation</a> | <a href="#siteInfo">footer (site information)</a>
   </div>
   <div id="header">
    <?php require_once('../../../int05c/incs/header.htm'); ?> 
   </div>
   <div id="utility">
    <?php require_once('../../../int05c/incs/ut.htm'); ?>
   </div>
   <div id="content"> 
	   <!--left menus-->
	   <div id="pageNav">
	   <?php require_once('../../../int05c/incs/nav3.htm'); ?>
	   </div>  
       <!--main content div--> 
       <div class="story"> <!-- InstanceBeginEditable name="content" --> 
          <div class="helpb">
		     <div align="center"><b class="boxheading">Evenings and Weekends:</b> 
	        </div>
		     <p align="center"> If a problem arises after 5:00 PM. weekdays or on Saturday or Sunday
		       or Holidays when the Library is open, then ask the Langsam Circulation
		       Shift Supervisor (556-1424) to place a call to the Trouble Call Pager.&nbsp;</p>
		     <p align="center" style="margin-bottom: 0;"> <b>Note
		         that this procedure applies only to problems that affect multiple workstations.</b> </p>
       </div><h1><b>Help Call Procedures-</b><b>Monday through Friday 8:00 AM - 5:00
             PM:</b>
       </h1>
         <br />
         If you are experiencing difficulties with either computer hardware,
           software or a network problem that disrupts service to patrons or
       staff, you may receive assistance by:<ul>
         <li>Filling out the form below which includes describing the nature of the problem, the building and room location as well as  the workstation ID which is located on the monitor of the Public/InfoCommons/Classroom workstations or the login username for service desks, staff, student assistant, and special services workstations.</li>
         <li>Sending an email to <a href="mailto:LIBHELP@UCMAIL.UC.EDU">LIBHELP@UCMAIL.UC.EDU</a> also including the above details.&nbsp; Copy the email to your supervisor or department head to keep them
         informed.</li>
       </ul>
         <p>If the form is not available and email is not available <b>OR</b> for <u>urgent</u> system wide
           problems then please call 556-1994 for assistance. (<strong>Note:</strong>&nbsp; if, in the unlikely event, you get no answer at 6-1994, please call 6-1515 with your description of the problem.) </p>
		  
           <hr />
       <h3>Form Notes: </h3>
       <ul>
         <li>Please choose your user name from the list if you are faculty or staff in University Libraries and choose the department from which the help call is being submitted. </li>
         <li>If not UL faculty or staff, please choose the department from which the help call is being submitted and fill in the e-mail field so that we may properly communicate with you concerning the call resolution.</li>
       </ul>
       <p class="lists"><strong>* Required Fields</strong>
<!--
edit: Michael Lucas
date: September 2, 2005
purpose:  sent an instant email to the user-->
<?php
	include ('/var/www/html/uclit/protected/connections/db_help.php');
		
	$query = "SELECT help_type FROM help_catagories ORDER BY help_type" ;
	$db = mysql_select_db("helpcalls", $helpConn) or die("Couldn't select database. helpcalls");
	$sql_result = mysql_query($query, $helpConn) or die("Couldn't execute query: $query");

	$query_per = "SELECT personnel_id, last_name, first_name FROM personnel WHERE removed='0' ORDER BY last_name" ; 	
	$db3 = mysql_select_db("uclit_db", $uclit_dbConn) or die("Couldn't select database. uclit_db");		
	$sql_per = mysql_query($query_per, $uclit_dbConn) or die("Couldn't execute query: $query_per");

	if (!$sql_result || !sql_per) 
	{
?>
	   <?php
	}
	else 
	{
?>					
	   <form action="add_help_ticket.php" method="post" name="ticket_form" onSubmit="return validator();">
			<table width="90%" border="0" align="left" class="formtable">
				<tr>
				    <td valign="top"><span class="lists">*</span>User's Name:</td>
				    <td><select name="per" onchange="CheckDisabled()">
                      <option value="0" selected="selected">Select...</option>
                      <option value="">Student/Other</option>					
<?php
								$ln = "";
								$fn = "";
								while ($row = mysql_fetch_array($sql_per)) 
								{
									$per_id = $row["personnel_id"];
									$ln = $row["last_name"];
									$fn = $row["first_name"];									
									echo"<option value=$per_id> $ln, $fn </option>";					
								}
?>									
                    </select>
			        <input type="hidden" name="username" value="$fn $ln" /></td>
			    </tr>
				  <tr>
				    <td valign="top"> <font color="#ff0000" size="3">*</font>Department:</td>
				    <td><select name="help_dept" id="Select1">
                      <option selected="selected" value="0">Select...</option>
<?php
	$query2 = "SELECT dept_name FROM departments ORDER BY dept_name" ;
		
	$db2 = mysql_select_db("uclit_db", $uclit_dbConn) or die("Couldn't select uclit_db database.");
	$sql_result2 = mysql_query($query2, $uclit_dbConn) or die("Couldn't execute query. <p>$query2</p>");
	
	
								while ($row = mysql_fetch_array($sql_result2))
								{
									$dept_name = $row["dept_name"];
									echo"<option>$dept_name</option>";
								}
?>								
                    </select>
			        </td>
			    </tr>
				  <tr>
					  <td valign="top">
						  <p> Phone Number:</td>
					  <td>
							  <p> 
					            <input type="text" name="help_phone" size="25" maxlength="25"></p>
					  </td>
					  
				</tr>
				  <tr >
					  <td valign="top" align="center">
						  <p align="left"><span class="lists">*</span></font>Help Call Description: </p>
				    </td>
				      <td valign="top" align="center"><textarea name="help_desc" cols="45" rows="5" wrap="virtual"></textarea></td>
				  </tr>	
				  <tr>
					  <td> E-mail(If Student/Other selected): </td>
					  <td><input name="email" type="text" size="50" disabled></td>	
				  </tr>
				  <tr>
					  <td> URL (If Necessary): </td>
					  <td><input name="help_url" type="text" size="50"></td>	
				  </tr>
				  <tr>
				    <td><input type="button" class="butt2" onclick="CheckBeforeSumbit()" value="Submit Help Call" /></td>
				    <td>&nbsp;</td>
			    </tr>
			  
			</table>
	   </form>
<?php				
	}
?>
<script type="text/javascript">

function CheckBeforeSumbit()
{
	var x = document.ticket_form;
	if(x.per.value == "0" || x.help_dept.value == "0" || x.help_desc.value == "")
	{
		window.alert("Please fill in all of the following items:\nUser\nDepartment\nHelp Description");
	}
	else
	{
		if(x.email.value == "")
		{
			if(x.per.value == "")
				window.alert("Student/Other needs to provide email\n in order to have email services for this helpcall");			
			else
			{
				x.submit();
				
			}
		}
		else
		{//check for correctness of the email
			var email = x.email.value;
			var reg1 = new RegExp("[0-9a-zA-Z]+@[a-zA-Z]+");
			if(reg1.test(email))
			{
				//window.alert("Good email");
				x.submit();
				
			}
			else
			{
				//bad email or empty email
				window.alert("Please enter a valid email address");
			}
		}
	}
}
function CheckDisabled()
{
	var x = document.ticket_form;
	if(x.per.value == "")
	{
		x.email.value = "";
		x.email.disabled = false;
	}
	else
	{
		x.email.value = "";
		x.email.disabled = true;
	}
	
}
</script>

       <p>
       <p>&nbsp;</p>
       <!-- InstanceEndEditable -->       </div>
   </div>
   
 <div id="siteInfo"> 
 <?php require_once('../../../int05c/incs/footer.htm'); ?>    
 </div>

</body>
<!-- InstanceEnd --></html>
<!-- clear all queries and free the databases-->