rendered paste body<?php
require("../_includes/db_common.php"); // database connect script.
if($sessLOGGEDIN == 0) {
die("You are not logged in. Please <a href=\"http://iq/Resources/RnDBAK/\">login</a> first to access this page.");
unset($_SESSION['sessUName']);
unset($_SESSION['sessPASS']); // kill session variables
unset($_SESSION['sessLOGGEDIN']); // kill session variables
$_SESSION = array(); // reset session array
session_destroy(); // destroy session.
header("Location: user_login.php"); // redirect them to anywhere you like.
}
//Increase the JumpMenu variables so menu will activate for each link
$posNums = array();
for ($i = 0; $i < $numRows; $i++) {
$rowcount = mysql_fetch_row($nb_list);
$pID = $rowcount[0];
}
$nb++;
$mb = $nb;
$jm = $mb;
// Separate the search fields into proper a SQL statement
//$sort = empty($_GET['sort']) ? 10 : $_GET['sort'];
//$clause = array();
//if ($nb_author != "") {
// $clause[] = "nb_auth LIKE '%$nb_author%'";
//}
//if ($nb_subj != "") {
// $clause[] = "nb_subject LIKE '%$nb_subj%'";
//}
//if ($nb_num != "") {
// $clause[] = "nb_number LIKE '%$nb_num%'";
//}
//if ($nb_type != "") {
// $clause[] = "nb_type LIKE '%$nb_type%'";
//}
$clause = array();
if ($_GET['nb_author'] != "") {
$clause[] = "nb_auth LIKE '%$_GET[nb_author]%'";
}
if ($_GET['nb_subj'] != "") {
$clause[] = "nb_subject LIKE '%$_GET[nb_subj]%'";
}
if ($_GET['nb_num'] != "") {
$clause[] = "nb_number LIKE '%$_GET[nb_num]%'";
}
if ($_GET['nb_type'] != "") {
$clause[] = "nb_type LIKE '%$_GET[nb_type]%'";
}
$clause = implode(' AND ', $clause);
$sql="SELECT * FROM Notebooks WHERE $clause ORDER BY nb_number ASC";
$result=mysql_query($sql, $db_link);
$nb_result = mysql_num_rows($result);
include('../_resources/PaginateIt.php');
$PaginateIt = new PaginateIt();
$PaginateIt->SetItemsPerPage(10);
$PaginateIt->SetPaginationMode('Slide');
$PaginateIt->SetItemCount($nb_result);
$sql=mysql_query("SELECT * FROM Notebooks WHERE $clause ORDER BY nb_number ASC".$PaginateIt->GetMySqlLimit());
// Setting searched variables output
if($nb_author != ""){
$d_auth = "Searched Author: <em style=\"color: #cc0000\">$nb_author</em>";
} if($nb_subj != ""){
$d_subj = "Searched Subject: <em style=\"color: #cc0000\">$nb_subj</em>";
} if($nb_num != ""){
$d_num = "Searched NB Number: <em style=\"color: #cc0000\">$nb_num</em>";
} if($nb_type != ""){
$d_type = "Searched NB Type: <em style=\"color: #cc0000\">$nb_type</em>";
}
?>
<html>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>iQ: Notebook Tracker</TITLE>
<link rel="stylesheet" href="../../../iQ_styles.css">
<link href="../_css/nb_css.css" rel="stylesheet" />
<script type="text/javascript" src="../_resources/functions.js"></script>
<script type="text/javascript" src="../_resources/sorttable.js"></script>
</HEAD>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF" link="#000099" vlink="#999999" alink="#FFFF33">
<span class="leftMenuSub"></span>
<TABLE BORDER="0" CELLPADDING="0" WIDTH="700" CELLSPACING="0">
<TR>
<TD COLSPAN="2" height="62" bgcolor="#000066"> <a href="../../../index.php"><img src="../../../images/white_on_blue_Q.gif" width="61" height="65" border="0" alt="Go to iQ Home page"></a>
</TD>
<TD align="right" height="62" bgcolor="#000066" valign="bottom" width="455"><img src="../../../images/resource_header.gif" width="260" height="50"></TD>
<TD align="right" height="62" bgcolor="#000066" valign="bottom" width="100"><br>
<font face="Arial, Helvetica, sans-serif" size="2" color="#000000"><font face="Arial, Helvetica, sans-serif" size="2"><a href="/help.html"><font color="#FFFFFF">Help</font></a></font><font color="#FFFFFF">
</font></font></TD>
</TR>
<TR>
<TD COLSPAN="4" height="2"><img src="../../../images/1-pix_purple.gif" width="700" height="3" border="0" ></TD>
</TR>
<TR>
<TD WIDTH="120" VALIGN="TOP" height="16" bgcolor="#CCCCCC"><!-- #BeginLibraryItem "/Library/jumpMenu.lbi" -->
<script language="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<form name="">
<font size="1" face="Arial, Helvetica, sans-serif">
<select name="main_iQ" onChange="MM_jumpMenu('parent',this,0)">
<option value="#" selected>Jump to ...</option>
<option value="/index.php">iQ Home Page</option>
<option value="http://www.quidel.com">Quidel.com</option>
<option value="/News/main_news.shtml">News & Info</option>
<option value="/News/communityQ/commQ_main.html">communityQ</option>
<option value="/HR/HR_main.html">Human Resources</option>
<option value="/HR/Benefits/HR_benefits_main.html">Benefits</option>
<option value="/HR/Opportunities/jobopen.php">Employment</option>
<option value="#">-Online Forms-</option>
<option value="/PublicIT/forms/it_request.html">Help Desk Req</option>
<option value="/Resources/fac-request.php">Facilities Req</option>
<option value="/Resources/EmpDir/empMain.php">Employee Directory</option>
</select>
</font>
</form>
<!-- #EndLibraryItem --></TD>
<TD VALIGN="TOP" height="16" width="25"><img src="/images/up_left_corn.gif" width="25" height="26"></TD>
<TD WIDTH="455" VALIGN="TOP" height="16" class="sectionheader">Quidel Laboratory Notebooks</TD>
<TD WIDTH="100" VALIGN="TOP" height="16"> </TD>
</TR>
<TR>
<TD WIDTH="120" VALIGN="TOP" bgcolor="#CCCCCC"><?php include("../_includes/NB_nav.php"); ?></TD>
<TD VALIGN="bottom" width="25" align="left"><img src="../../../images/lower_left_gray_corner.gif" width="25" height="21"></TD>
<TD WIDTH="581" VALIGN="TOP" colspan="2"> <br>
<table width="98%" border="0" cellspacing="0" cellpadding="2" bgcolor="#660099" >
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="White" >
<tr>
<td>
<form name="print" action="print_res.php" method="POST" onSubmit="popupform(this, 'join')">
<input type="hidden" name="sauth" value="<?php echo $nb_author; ?>">
<input type="hidden" name="ssubj" value="<?php echo $nb_subj; ?>">
<input type="hidden" name="snum" value="<?php echo $nb_num; ?>">
<input type="hidden" name="stype" value="<?php echo $nb_type; ?>">
<div id="MContainer">
<br>
<?php
if($nb_result>0){
// Display the results
echo "<p>";
echo "<div style=\"text-align: left\">";
echo "<strong>Search results for:</strong><br>";
if(isset($d_auth)){echo "$d_auth<br>";}
if(isset($d_subj)){echo "$d_subj<br>";}
if(isset($d_num)){echo "$d_num<br>";}
if(isset($d_type)){echo "$d_type<br>";}
echo "</div>";
echo "</p>";
echo '<div class="vbulletin">';
echo $PaginateIt->GetPageLinks('<div class="page_summary">Page {c} of {t}:</div>{p:<} {links:5: } {n:>}');
echo '</div>';
echo "<table id=\"TblHDRs\" width=\"500\" class=\"sortable\">";
echo "<thead>";
echo "<tr>";
echo "<th class=\"THMain\"> </th>";
echo "<th class=\"THMain\">NB#</th>";
echo "<th class=\"THMain\">Author</th>";
echo "<th class=\"THMain\">Subject Matter</th>";
echo "<th class=\"THMain\" width=\"75\">Issued</th>";
echo "</tr>";
echo "</thead>";
while ($result=mysql_fetch_assoc($sql)) {
//while ($row=mysql_fetch_assoc($result)){
$idate = date('M-d-Y', UnixTime($row[issue_date]));
echo "<tr>";
echo "<td><input type=\"checkbox\" name=\"print_me[]\" value=\"$row[nb_id]\">";
echo "<td class=\"TDText\"><span style=\"cursor: pointer;\" id=\"nb_control".$nb."\" onclick=\"showHideMenu('nb_control".$nb."','JumpMenu".$nb."')\"><a href=\"javascript:void(0);\">$row[nb_number]</a></span>";
echo "<div id=\"JumpMenu".$nb++."\" style=\"display: none;\">";
echo "<table id=\"TblJumpMenu\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
if($_SESSION['sessACCESS'] == 4){
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_edit.php?nbid=$row[nb_id]\"><strong>Edit $row[nb_number]</strong></a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_return.php?nbid=$row[nb_id]\">Reference Check In $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_reissue.php?nbid=$row[nb_id]\">Reference Check Out $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_audit.php?nbid=$row[nb_id]\">Audit $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_archive.php?nbid=$row[nb_id]\">Archive $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_expire.php?nbid=$row[nb_id]\">Expire $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_destroy.php?nbid=$row[nb_id]\">Destroy $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td id=\"Last\" class=\"JumpMenu_ContentLast\"><a href=\"../logs/log_history.php?nbid=$row[nb_id]\">View $row[nb_number] Log History</a></td>";
echo "</tr>";
} elseif($_SESSION['sessACCESS'] == 1){
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_edit.php?nbid=$row[nb_id]\"><strong>Edit $row[nb_number]</strong></a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_return.php?nbid=$row[nb_id]\">Reference Check In $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_reissue.php?nbid=$row[nb_id]\">Reference Check Out $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_audit.php?nbid=$row[nb_id]\">Audit $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_archive.php?nbid=$row[nb_id]\">Archive $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_expire.php?nbid=$row[nb_id]\">Expire $row[nb_number]</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td id=\"Last\" class=\"JumpMenu_ContentLast\"><a href=\"../logs/log_history.php?nbid=$row[nb_id]\">View $row[nb_number] Log History</a></td>";
echo "</tr>";
} elseif($_SESSION['sessACCESS'] == 2){
echo "<tr>";
echo "<td class=\"JumpMenu_Content\"><a href=\"nb_edit.php?nbid=$row[nb_id]\"><strong>View $row[nb_number] Details</strong></a></td>";
echo "</tr>";
echo "<tr>";
echo "<td id=\"Last\" class=\"JumpMenu_ContentLast\"><a href=\"../logs/log_history.php?nbid=$row[nb_id]\">View $row[nb_number] Log History</a></td>";
echo "</tr>";
}
echo "</table>";
echo "</div>";
echo "<script type=\"text/javascript\">registerPopup('JumpMenu".$jm++."');</script>";
echo "</td>";
echo "<td class=\"TDText\">$row[nb_auth]</td>";
echo "<td class=\"TDText\">$row[nb_subject]</td>";
echo "<td class=\"TDTextLast\">$idate</td>";
echo "</tr>";
}
echo "<tfoot>";
echo "<tr>";
echo "<td width=\"25\" class=\"text\"><input type=\"checkbox\" name=\"checkall\" onclick=\"checkUncheckAll(this);\" /></td>";
echo "<td colspan=\"4\" bgcolor=\"#ffffff\" width=\"475\" class=\"text\" >Select All / None</td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan=\"5\" bgcolor=\"#ffffff\" width=\"500\" class=\"text\" ><input name=\"print_these\" type=\"submit\" value=\"Print Selected\"></td>";
echo "</tr>";
echo "</tfoot>";
echo "</table>";
} elseif($nb_result<=0) {
echo "<br><span class=\"textBold\">There are no matches to your search. Please try again.</span><br><a href=\"nb_search.php\">Start a new search</a>";
}
?>
<div style="clear: both;"></div>
<br>
</div>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
</TD>
</TR>
<TR align="center">
<TD height="2" colspan="4" bgcolor="#CCCCCC" valign="bottom"><img src="../../../images/1-pix_gray.gif" width="700" height="4"><br>
<font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"> <!-- #BeginLibraryItem "/Library/IQcopyright.lbi" --><font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><a href="mailto:webmaster@quidel.com">Comments
or questions?</a> This site is for the sole use of Quidel Corporation employees.</font><!-- #EndLibraryItem --></font></TD>
</TR>
</TABLE>
</BODY>
</HTML>