<?php
/*
index.php
auth: Graham McCarthy @ Ryerson University Library
date: June 28th 2007
desc: Main application. Contains the search the catalogue, search articles, launch external links, and a breif news feed.
	
*/

// includes
require_once 'appinclude.php';
require 'dashboard.php';

?>

<div style="padding: 20px;">
	<!-- Image for the header --->
	<img src="<? echo $appcallbackurl; ?>facebookMainPage.jpg" />
	<br />
	<h2>Hello <fb:name firstnameonly="true" uid="<?=$user?>" useyou="false"/>,  
		Welcome to the Ryerson University Library on Facebook.</h2>
	<br />
	<hr />
	<br/>
  	<table cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr><td valign="top">
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
			<tr>
				<th>External Links</th>
			</tr>
			<tr>
				<td><a href="http://www.ryerson.ca/library/" target="_new"><li> Library Home Page</li></a></td>
			</tr>
			<tr>
				<td><a href="http://innopac.lib.ryerson.ca/" target="_new"><li> Catalogue</li></a></td>
			</tr>
			<tr>
				<td><a href="http://innopac.lib.ryerson.ca/search/r" target="_new"><li> Course Readings</li></a></td>
			</tr>
			<tr>
				<td><a href="http://www.ryerson.ca/library/indexes.html" target="_new"><li> Articles and Indexes</li></a></td>
			</tr>
			<tr>
				<td><a href="http://www.ryerson.ca/madar" target="_new"><li> Map and Data Resources</li></a></td>
			</tr>
			<tr>
				<td><a href="http://innopac.lib.ryerson.ca/patroninfo" target="_new"><li>Check your File/Renew Books</li></a></td>
			</tr>
			<tr>
				<td><a href="http://www.ryerson.ca/library/ask.html" target="_new"><li> Ask a Librarian</li></a></td>
			</tr>
			<tr>
				<td><a href="https://www.runner.ryerson.ca/studyrooms" target="_new"><li> Room Bookings</li></a></td>
			</tr>
			<tr>
				<td><a href="http://www.ryerson.ca/library/info/hours.html" target="_new"><li> Hours</li></a></td>
			</tr>
			<tr>
			   <td><a href="http://innopac.lib.ryerson.ca/screens/borrow.html" target="_new">
			   		<li>Borrow From Other Libraries</li></a>			
			   </td>
			</tr>
		</table> 
		</td>
		<td valign="top">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
			<tbody>
			<tr>
				<td>
					<h3>Find Books, ebooks, DVDs, theses,...</h3>
						<form action="http://innopac.lib.ryerson.ca/search/" method="get" target="_blank">
		Search 
			<select name="searchtype"> 
				<option value="X" selected>Keywords</option>
				<option value="t">Title</option> 
				<option value="a">Author</option> 
				<option value="d">Subject</option> 
				<option value="s">Journal Title</option> 
				<option value="r">Course</option> 
				<option value="p">Prof/TA</option>
			</select> for <input type="text" size="30" name="searcharg">
			<input type="hidden" value="D" name="SORT"> <input type="submit" value="Go"> &nbsp;(opens in new window)				
	</form>
				</td>
			</tr>
			</tbody>
			</table>
		</td> 
	</tr>
	</table>
	<br />
	<div style="padding-right: 20px;">
	<fb:iframe src='<?=$appcallbackurl?>newsfeedDigest.php'  smartsize='true' frameborder='false' />
	</div>
  <div style="clear: both; "/>
</div>

<?php

///IN BOTH OF THESE TAGS <fb:narrow> and <fb:wide>YOU NEED TO CHANGE the Location of the Servers highlited in UPPERCASE text. 
//As well as the application directories also highlighted in UPPERCASE writing.

$fbml = '
<fb:narrow>
<fb:subtitle>Search Catalogue:</fb:subtitle> 
	<img src="http://www.YOURSERVER.com/FACEBOOKAPPDIRECTORY/facebookMainPageSmall.jpg" />
	<form action="http://innopac.lib.ryerson.ca/search/" method="get" target="_blank">
		Search 
			<select name="searchtype"> 
				<option value="X" selected>Keywords</option>
				<option value="t">Title</option> 
				<option value="a">Author</option> 
				<option value="d">Subject</option> 
				<option value="s">Journal Title</option> 
				<option value="r">Course</option> 
				<option value="p">Prof/TA</option>
			</select>
			for
			<input type="text" name="searcharg" />
			<input type="hidden" value="D" name="SORT" /> <input type="submit" value="Go" /> &nbsp;(opens in new window)				
	</form>
	<hr />
	<a href="" clicktotoggle="cdc03" >show/hide links</a>
	<span id="cdc03"  style="display:none;" >
	<ul> Links:
	<li><a href="http://apps.facebook.com/APP_DIRECTORY/index.php">Library App</a></li>
	<li><a href="http://www.ryerson.ca/library" target="_blank">Library Website</a></li>  
	</ul>
	</span>
</fb:narrow>

<fb:wide>
	<fb:subtitle>Search Catalogue:</fb:subtitle> 
	<img src="http://www.YOURSERVER.com/APP_DIRECTORY/facebookMainPage.jpg" />
	<form action="http://innopac.lib.ryerson.ca/search/" method="get" target="_blank">
		Search 
			<select name="searchtype"> 
				<option value="X" selected>Keywords</option>
				<option value="t">Title</option> 
				<option value="a">Author</option> 
				<option value="d">Subject</option> 
				<option value="s">Journal Title</option> 
				<option value="r">Course</option> 
				<option value="p">Prof/TA</option>
			</select> for <input type="text" size="30" name="searcharg">
			<input type="hidden" value="D" name="SORT"> <input type="submit" value="Go"> &nbsp;(opens in new window)				
	</form>
	<hr />
	<a href="" clicktotoggle="cdc03" >show/hide links</a>
	<span id="cdc03"  style="display:none;" >
	<ul> Links:
	<li><a href="http://apps.facebook.com/APP_DIRECTORY/index.php">Library App</a></li>
	<li><a href="http://www.ryerson.ca/library" target="_blank">Library Website</a></li>  
	</ul>
	</span>
</fb:wide>
';
	
    $facebook->api_client->profile_setFBML($fbml, $user);

?>
