<?php

// -----------------------------------------------------------------------
// This file is part of AROUNDMe
//
// Copyright (C) 2003 - 2006 Barnraiser
// http://www.barnraiser.org/
// info@barnraiser.org
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option) any
// later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with program; see the file COPYING. If not, write to the Free
// Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
// 02110-1301, USA.
// -----------------------------------------------------------------------

?>

<form action="my_bookmarks.php" method="post">


<div class="col_left1">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_watching'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td colspan="2">
							<b><?php echo $lang['hdr_subjects'];?></b><br />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
						</td>
					</tr>
					<?php
					if (isset($watched_subjects)) {
					foreach($watched_subjects as $key => $i):
					
					if (!empty($i['group_id'])) {
						$url = "frm_item.php?group_id=" . $i['group_id'] . "&amp;subject_id=" . $i['subject_id'];
					}
					else {
						 $url = "frm_item.php?subject_id=" . $i['subject_id'];
					}
					?>
					<tr valign="top">
						<td>
							<a href="<?php echo $url;?>"><?php echo $i['subject_title'];?></a><br />
							<?php echo dots(120, $i['subject_body']);?><br />
							<?php
							if (isset($i['movement']['lastview_datetime'])) {
								echo $lang['txt_lastview'] . " " . $i['movement']['lastview_datetime'] . " (" . $lang['txt_movement'] . " ". $i['movement']['movement'] . ")";
							}
							?></span><br />
						</td>
						<td align="right" valign="top">
							<input type="checkbox" name="watch_subject_delete_id[]" value="<?php echo $i['subject_id'];?>" /><br />
						</td>
					</tr>
					<?php
					endforeach;
					}
					?>
				</table>
				<hr />
				<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
	
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td colspan="2">
							<b><?php echo $lang['hdr_library'];?></b><br />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
						</td>
					</tr>
					<?php
					if (isset($watched_library)) {
					foreach($watched_library as $key => $i):
					
					if (!empty($i['group_id'])) {
						$url = "lib_item.php?group_id=" . $i['group_id'] . "&amp;library_id=" . $i['library_id'];
					}
					else {
						 $url = "lib_item.php?library_id=" . $i['library_id'];
					}
					?>
					<tr>
						<td>
							<?php
							if (isset($i['image'])) {
							?>
								<img align="left" src="get_file.php?file=<?php echo $i['image']['file'];?>" border="0" class="picture_left" alt="<?php echo $i['image']['file_title'];?>" />
							<?
							}
							?>
							<a href="<?php echo $url;?>"><?php echo $i['library_title'];?></a><br />
							<?php echo $i['library_synopsis'];?><br />
						</td>
						<td align="right" valign="top">
							<input type="checkbox" name="watch_library_delete_name[]" value="<?php echo $i['library_id'];?>"><br />
						</td>
					</tr>
					<?php
					endforeach;
					}
					?>
				</table>
	
				<hr />
				<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
	
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td colspan="2">
							<b><?php echo $lang['hdr_schedule'];?></b><br />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
						</td>
					</tr>
					<?php
					if (isset($watched_schedule_items)) {
					foreach($watched_schedule_items as $key => $i):
					
					if (!empty($i['group_id'])) {
						$url = "sch_item.php?group_id=" . $i['group_id'] . "&amp;schedule_id=" . $i['schedule_id'];
					}
					else {
						 $url = "sch_item.php?schedule_id=" . $i['schedule_id'];
					}
					?>
					<tr>
						<td>
							<?php
							if (isset($i['image'])) {
							?>
								<img align="left" src="get_file.php?file=<?php echo $i['image']['file'];?>" border="0" class="picture_left" alt="<?php echo $i['image']['file_title'];?>" />
							<?
							}
							?>
							<a href="<?php echo $url;?>"><?php echo $i['schedule_title'];?></a><br />
							<?php echo $i['schedule_start_datetime'];?><br />
							<?php echo $i['schedule_synopsis'];?><br />
						</td>
						<td align="right" valign="top">
							<input type="checkbox" name="watch_schedule_delete_id[]" value="<?php echo $i['schedule_id'];?>" /><br />
						</td>
					</tr>
					<?php
					endforeach;
					}
					?>
				</table>
	
				<hr />
				<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
	
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td colspan="2">
							<b><?php echo $lang['hdr_blogs'];?></b><br />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
						</td>
					</tr>
					<?php
					if (isset($watched_blogs)) {
					foreach($watched_blogs as $key => $i):
					
					if (!empty($i['group_id'])) {
						$url = "blg_item.php?group_id=" . $i['group_id'] . "&amp;blog_id=" . $i['blog_id'];
					}
					else {
						 $url = "blg_item.php?blog_id=" . $i['blog_id'];
					}
					?>
					<tr>
						<td>
							<?php echo $i['blog_create_datetime'];?><br />
							<a href="<?php echo $url;?>"><?php echo $i['blog_title'];?></a><br />
							<?php echo $i['blog_synopsis'];?><br />
						</td>
						<td align="right" valign="top">
							<input type="checkbox" name="watch_blog_delete_id[]" value="<?php echo $i['blog_id'];?>" /><br />
						</td>
					</tr>
					<?php
					endforeach;
					}
					?>
				</table>
	
				<hr />
				<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
	
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td colspan="2">
							<b><?php echo $lang['hdr_polls'];?></b><br />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
						</td>
					</tr>
					<?php
					if (isset($watched_polls)) {
					foreach($watched_polls as $key => $i):
					
					if (!empty($i['group_id'])) {
						$url = "pol_item.php?group_id=" . $i['group_id'] . "&amp;poll_id=" . $i['poll_id'];
					}
					else {
						 $url = "pol_item.php?poll_id=" . $i['poll_id'];
					}
					?>
					<tr>
						<td valign="top">
							<?php
							$poll = $i;
							$poll_url = $url;
							include $templatePath . "poll.inc.tpl.php";
							?>
						</td>
						<td align="right" valign="top">
							<input type="checkbox" name="watch_poll_delete_id[]" value="<?php echo $i['poll_id'];?>"><br />
						</td>
					</tr>
					<?php
					endforeach;
					}
					?>
				</table>
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>

<div class="col_right1">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_my_bookmark'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td valign="top">
							<?php echo $lang['txt_delete_bookmark'];?><br />
						</td>
						<td align="right" valign="top">
							<input type="submit" name="delete_bookmark" value="<?php echo $lang['sub_delete'];?>" class="button_urgent" /><br />
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
	
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_recommended'];?><br />
		</div>

		<div class="box_mid">
			<div class="content">
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td colspan="2">
							<b><?php echo $lang['hdr_subjects'];?></b><br />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
						</td>
					</tr>
					<?php
					if (isset($recommended_subjects)) {
					foreach($recommended_subjects as $key => $i):
					
					if (!empty($i['group_id'])) {
						$url = "frm_item.php?group_id=" . $i['group_id'] . "&amp;subject_id=" . $i['subject_id'];
					}
					else {
						 $url = "frm_item.php?subject_id=" . $i['subject_id'];
					}
					?>
					<tr>
						<td>
							<a href="<?php echo $url;?>"><?php echo $i['subject_title'];?></a><br />
							<?php echo dots(120, $i['subject_body']);?><br />
						</td>
						<td align="right" valign="top">
							<input type="checkbox" name="rec_subject_delete_id[]" value="<?php echo $i['subject_id'];?>" /><br />
						</td>
					</tr>
					<?php
					endforeach;
					}
					?>
				</table>
	
				<hr />
				<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
	
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td colspan="2">
							<b><?php echo $lang['hdr_library'];?></b><br />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
						</td>
					</tr>
					<?php
					if (isset($recommended_library)) {
					foreach($recommended_library as $key => $i):
					
					if (!empty($i['group_id'])) {
						$url = "lib_item.php?group_id=" . $i['group_id'] . "&amp;library_id=" . $i['library_id'];
					}
					else {
						 $url = "lib_item.php?library_id=" . $i['library_id'];
					}
					?>
					<tr>
						<td>
							<a href="<?php echo $url;?>"><?php echo $i['library_title'];?></a><br />
							<?php echo dots(120, $i['library_synopsis']);?><br />
						</td>
						<td align="right" valign="top">
							<input type="checkbox" name="rec_library_delete_id[]" value="<?php echo $i['library_id'];?>" /><br />
						</td>
					</tr>
					<?php
					endforeach;
					}
					?>
				</table>
	
				<hr />
				<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
	
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td colspan="2">
							<b><?php echo $lang['hdr_schedule'];?></b><br />
						</td>
					</tr>
					<?php
					if (isset($recommended_schedule_items)) {
					foreach($recommended_schedule_items as $key => $i):
					
					if (!empty($i['group_id'])) {
						$url = "sch_item.php?group_id=" . $i['group_id'] . "&amp;schedule_id=" . $i['schedule_id'];
					}
					else {
						 $url = "sch_item.php?schedule_id=" . $i['schedule_id'];
					}
					?>
					<tr>
						<td>
							<?php
							if (isset($i['image'])) {
							?>
								<img align="left" src="get_file.php?file=<?php echo $i['image']['file'];?>" border="0" class="picture_left" alt="<?php echo $i['image']['file_title'];?>" />
							<?
							}
							?>
							<a href="<?php echo $url;?>"><?php echo $i['schedule_title'];?></a><br />
							<?php echo $i['schedule_start_datetime'];?><br />
							<?php echo $i['schedule_synopsis'];?><br />
						</td>
						<td align="right" valign="top">
							<input type="checkbox" name="rec_schedule_delete_id[]" value="<?php echo $i['schedule_id'];?>" /><br />
						</td>
					</tr>
					<?php
					endforeach;
					}
					?>
				</table>
	
				<hr />
				<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
	
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td colspan="2">
							<b><?php echo $lang['hdr_blogs'];?></b><br />
						</td>
					</tr>
					<?php
					if (isset($recommended_blogs)) {
					foreach($recommended_blogs as $key => $i):
					
					if (!empty($i['group_id'])) {
						$url = "blg_item.php?group_id=" . $i['group_id'] . "&amp;blog_id=" . $i['blog_id'];
					}
					else {
						 $url = "blg_item.php?blog_id=" . $i['blog_id'];
					}
					?>
					<tr>
						<td>
							<a href="<?php echo $url;?>"><?php echo $i['blog_title'];?></a><br />
							<?php echo $i['blog_create_datetime'];?><br />
							<?php echo dots('120', $i['blog_synopsis']);?><br />
						</td>
						<td align="right" valign="top">
							<input type="checkbox" name="rec_blog_delete_id[]" value="<?php echo $i['blog_id'];?>"><br />
						</td>
					</tr>
					<?php
					endforeach;
					}
					?>
				</table>
	
				<hr />
				<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="3" alt="" /><br />
	
				<table width="100%" cellpadding="4" cellspacing="0" border="0">
					<tr>
						<td colspan="2">
							<b><?php echo $lang['hdr_polls'];?></b><br />
						</td>
					</tr>
					<?php
					if (isset($recommended_polls)) {
					foreach($recommended_polls as $key => $i):
					
					if (!empty($i['group_id'])) {
						$url = "pol_item.php?group_id=" . $i['group_id'] . "&amp;poll_id=" . $i['poll_id'];
					}
					else {
						 $url = "pol_item.php?poll_id=" . $i['poll_id'];
					}
					?>
					<tr>
						<td valign="top">
							<?php
							$poll = $i;
							$poll_url = $url;
							include $templatePath . "poll.inc.tpl.php";
							?>
						</td>
						<td align="right" valign="top">
							<input type="checkbox" name="rec_poll_delete_id[]" value="<?php echo $i['poll_id'];?>"><br />
						</td>
					</tr>
					<?php
					endforeach;
					}
					?>
				</table>
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>
</form>
