
<?php require_once('Connections/intranews.php'); ?>
<?php require_once('Connections/rssnews.php'); ?>
<?php require_once('Connections/intranews.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$maxRows_libnews = 3;
$pageNum_libnews = 0;
if (isset($_GET['pageNum_libnews'])) {
  $pageNum_libnews = $_GET['pageNum_libnews'];
}
$startRow_libnews = $pageNum_libnews * $maxRows_libnews;

mysql_select_db($database_intranews, $intranews);
$query_libnews = "SELECT main.news_id, main.headline FROM main WHERE main.type = 1 ORDER BY main.news_id DESC";
$query_limit_libnews = sprintf("%s LIMIT %d, %d", $query_libnews, $startRow_libnews, $maxRows_libnews);
$libnews = mysql_query($query_limit_libnews, $intranews) or die(mysql_error());
$row_libnews = mysql_fetch_assoc($libnews);

if (isset($_GET['totalRows_libnews'])) {
  $totalRows_libnews = $_GET['totalRows_libnews'];
} else {
  $all_libnews = mysql_query($query_libnews);
  $totalRows_libnews = mysql_num_rows($all_libnews);
}
$totalPages_libnews = ceil($totalRows_libnews/$maxRows_libnews)-1;

$maxRows_tips = 3;
$pageNum_tips = 0;
if (isset($_GET['pageNum_tips'])) {
  $pageNum_tips = $_GET['pageNum_tips'];
}
$startRow_tips = $pageNum_tips * $maxRows_tips;

mysql_select_db($database_intranews, $intranews);
$query_tips = "SELECT main.news_id, main.headline FROM main WHERE main.type = 2 ORDER BY main.sub_date DESC";
$query_limit_tips = sprintf("%s LIMIT %d, %d", $query_tips, $startRow_tips, $maxRows_tips);
$tips = mysql_query($query_limit_tips, $intranews) or die(mysql_error());
$row_tips = mysql_fetch_assoc($tips);

if (isset($_GET['totalRows_tips'])) {
  $totalRows_tips = $_GET['totalRows_tips'];
} else {
  $all_tips = mysql_query($query_tips);
  $totalRows_tips = mysql_num_rows($all_tips);
}
$totalPages_tips = ceil($totalRows_tips/$maxRows_tips)-1;

mysql_select_db($database_rssnews, $rssnews);
$query_ejcjournals = "SELECT main.id, main.name, main.type FROM main WHERE main.type = 2 ORDER BY main.name";
$ejcjournals = mysql_query($query_ejcjournals, $rssnews) or die(mysql_error());
$row_ejcjournals = mysql_fetch_assoc($ejcjournals);
$totalRows_ejcjournals = mysql_num_rows($ejcjournals);

mysql_select_db($database_rssnews, $rssnews);
$query_gen_news = "SELECT main.name, main.id, main.type FROM main WHERE main.type = 3 ORDER BY main.name";
$gen_news = mysql_query($query_gen_news, $rssnews) or die(mysql_error());
$row_gen_news = mysql_fetch_assoc($gen_news);
$totalRows_gen_news = mysql_num_rows($gen_news);

mysql_select_db($database_rssnews, $rssnews);
$query_librelated = "SELECT main.id, main.name, main.type FROM main WHERE main.type = 1 ORDER BY main.name";
$librelated = mysql_query($query_librelated, $rssnews) or die(mysql_error());
$row_librelated = mysql_fetch_assoc($librelated);
$totalRows_librelated = mysql_num_rows($librelated);
?>
<!--includes for all the database connections required by the home page-->

<!--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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!--adjust template parameter to change the main style sheet, or leave it blank-->
<!--use this editable area to add an additional style sheet-->
<title>Intranet Home Page</title>
<!-- use the editable area below to add any additional head items-->
<!--code to load css set up above-->
<?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]-->
 

<style type="text/css">
<!--
.style1 {color: #0066CC}
.style2 {
	color: #FE5500;
	font-weight: bold;
}
-->
</style>
</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"> 
	 <div id="pageNav">
	 <?php require_once('int05c/incs/nav3.htm'); ?>
	 </div>   
      <div class="story">   <h2>                 Today is <?php echo date("l , F d Y"); ?> </h2>
                 <p class="smalltext"> Items can be added to the University
                 Libraries news and quick tips by staff, <a href="/news/submit_news.php">by
                 filling out this form. </a>See the &quot;Quick Tip&quot; below
                 for more information.</p>
                 <p align="center" class="smalltext style1">&nbsp;</p>
                 <h2>UL Weekly calendar:</h2>
				 <!-- calendar goes here-->
				 <iframe src="/cgi-bin/Calcium310.cgi?CalendarName=ULMain&Type=Block&Amount=Week&PrintView=1&PrintColors=all" width="100%" height="150" style="background-color:#FFFFFF ">
If you are seeing this message, your browser does not support the iframe feature. The content here is the ul calendar.
</iframe>

                       <p></p>   <table width="100%"  border="0" cellspacing="0" cellpadding="5">
                   <tr align="left" valign="top">
<td colspan="2" bordercolor="#000099" bgcolor="#CCCCCC">
<h2><a href="departments/libit/web/index.html">(experimental) Google Books on Cincinnati:</a> 
<!-- ++Begin Book Bar Wizard Generated Code++ -->
  <!--
  // Created with a Google AJAX Search Wizard
  // http://code.google.com/apis/ajaxsearch/wizards.html
  -->

  <!--
  // The Following div element will end up holding the actual bookbar.
  // You can place this anywhere on your page.
  -->
</h2>
<div id="bookBar-bar">
    <span
style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...
</span>
</div>

  <!-- Ajax Search Api and Stylesheet
  // Note: If you are already using the AJAX Search API, then do not
include it
  //       or its stylesheet again
  //
  // The Key Embedded in the following script tag is designed to work
with
  // the following site:
  // http://ul.uc.edu
  -->
  <script
src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-bbw&key=
ABQIAAAA7o8EcxtK8Xmn-MaYmAE37BT54d5rRaGt_nPWL5CSiNY5A-bGnhQAaZCaeJZG4wmL
cXIni-nX6ipu1g"
    type="text/javascript"></script>
  <style type="text/css">
    @import url("http://www.google.com/uds/css/gsearch.css");
  </style>

  <!-- Video Bar Code and Stylesheet -->
  <script type="text/javascript">
    window._uds_bbw_donotrepair = true;
  </script>
  <script
src="http://www.google.com/uds/solutions/bookbar/gsbookbar.js?mode=new"
    type="text/javascript"></script>
  <style type="text/css">
    @import
url("http://www.google.com/uds/solutions/bookbar/gsbookbar.css");
  </style>

  <script type="text/javascript">
    function LoadBookBar() {

    var bookBar;
    var options = {
        largeResultSet : !true,
        horizontal : true,
        autoExecuteList : {
          cycleTime : GSbookBar.CYCLE_TIME_MEDIUM,
          cycleMode : GSbookBar.CYCLE_MODE_RANDOM,
          executeList : ["Cincinnati"]
        }
      }

    bookBar = new GSbookBar(document.getElementById("bookBar-bar"),
                              options);
    }
    // arrange for this function to be called during body.onload
    // event processing
    GSearch.setOnLoadCallback(LoadBookBar);
  </script>
<!-- ++End Book Bar Wizard Generated Code++ --></td>
</tr>
<tr align="left" valign="top">
  <td width="55%"><h2>News</h2>
    <p>                          
      <?php do { ?>
      <a href="/news/news_detail2.php?rID=<?php echo $row_libnews['news_id']; ?>"><?php echo $row_libnews['headline']; ?></a><br />
      <?php } while ($row_libnews = mysql_fetch_assoc($libnews)); ?>                         <br />
<a href="/int05c/cf3.php?feed=1"> </a></p></td>
  <td width="45%"><h2>Quick Tips for Staff
                     </h2>
    <p> 
      <?php do { ?>
      <a href="/news/news_detail2.php?rID=<?php echo $row_tips['news_id']; ?>"><?php echo $row_tips['headline']; ?></a><br />
      <?php } while ($row_tips = mysql_fetch_assoc($tips)); ?> 
      <br />
</p></td>
                   </tr>
                   <tr align="left" valign="top">
<td colspan="2" bgcolor="#FFFFFF"><h2>Interesting Library Related Sites/Tools/Software </h2></td>
</tr>
<tr align="left" valign="top">
<td colspan="2" bgcolor="#FFFFFF"><ul>
<li><a href="http://www.libworm.com/" target="_blank">http://www.libworm.com/</a>-the librarian RSS engine
over 1500 RSS feeds go in
exactly what you need   comes out!</li>
<li><a href="http://www.firstgov.gov/Topics/Reference_Shelf/Libraries/RSS_Library.shtml" target="_blank">
U.S. Government RSS Library

</a></li>
</ul></td>
</tr>
<tr align="left" valign="top">
<td colspan="2" bgcolor="#FE5500"><div align="center">
<h1><img src="int05c/images/rss.gif" alt="RSS" width="27" height="13" hspace="5" vspace="5" border="4" align="middle" /> RSS Feeds for Staff <br />
</h1>
</div></td>
</tr>
<tr align="left" valign="top">
  <td><h2>Library Related Journals in the EJC </h2><br />
        <?php do { ?>
        <a href="/news/cf3.php?feed=<?php echo $row_ejcjournals['id']; ?>"><?php echo $row_ejcjournals['name']; ?></a><br />
        <?php } while ($row_ejcjournals = mysql_fetch_assoc($ejcjournals)); ?> 
  </h2>                     </td>
  <td><h2>Library Related RSS </h2>
   <?php do { ?>

<a href="/news/cf3.php?feed=<?php echo $row_librelated['id'];?>"><?php echo $row_librelated['name']; ?></a><br />
<?php } while ($row_librelated = mysql_fetch_assoc($librelated)); ?> </td>
                   </tr>
                   <tr>
<td colspan="2"><h2>General News </h2></td>
</tr>
<tr>
<td colspan="2"><?php do { ?>
<a href="/news/cf3.php?feed=<?php echo $row_gen_news['id']; ?>"><?php echo $row_gen_news['name']; ?></a><br />
<?php } while ($row_gen_news = mysql_fetch_assoc($gen_news)); ?></td>
</tr>

<tr>
  <td colspan="2"><h2 align="center">Weather</h2>
    <p align="center"><a href="http://www.wunderground.com/US/OH/Cincinnati.html"></a></p>
  <p align="center"><a href="http://www.wunderground.com/US/OH/Cincinnati.html"><img src="http://banners.wunderground.com/banner/infobox_both/language/www/US/OH/Cincinnati.gif"
alt="Click for Cincinnati, Ohio Forecast" width="144" height="108" border="1" align="center" /></a> </p></td>
                     </tr>
                   <tr>
                     <td colspan="2" class="smtext"><div align="center"><a href="/news/submit_news.php">Add
                     an item to this page </a></div></td>
                   </tr>
                 </table>
        	             
    </div> 
   </div>
   
 <div id="siteInfo">Visitors since 4/25/05:
   <script language="Javascript" src="http://ul.uc.edu/counts/counter.php?page=index2.php"><!--
//--></script> 
   <br />
   <?php require_once('int05c/incs/footer.htm'); ?>    
</div>

</body>
</html>
<!-- clear all queries and free the databases-->
<?php
mysql_free_result($tips);

mysql_free_result($ejcjournals);

mysql_free_result($gen_news);

mysql_free_result($librelated);

mysql_free_result($libnews);
?>
